create plotting .png and .R files