adding pdf output for plots as well as png