Question: Can Listplot be set to render the data as an image whilst leaving axes and labels as vectors when saved as a PDF?

Context: I have around 100,000 points in my listplot which when saved to a PDF is a huge 14 MB, for just one small figure in my LaTex file. I could easily save it as a PNG but then the axes and labels don't look nice especially if you zoom in.

Update: Alternatively could the detail of the vector PDF output be reduced?

  • $\begingroup$ to have nice pictures you should use Export command and set proper imagesize, e.g.: Export["qwerty.png", obj, ImageSize -> 1500]. You may also need to tweak the size of the fonts for labels and grid for better result. $\endgroup$
    – funnyp0ny
    Oct 25, 2014 at 18:02
  • $\begingroup$ Thanks for the comment. That's true I can make them high res. I guess I want the axes and labels to be vectors as it seems more professional. $\endgroup$
    – User
    Oct 25, 2014 at 18:13
  • $\begingroup$ Use .eps instead of .pdf, which is more usual for latex and generates files of much lower size. Also you can consider using fewer points - say 1000 or less instead of 100000 $\endgroup$
    – funnyp0ny
    Oct 25, 2014 at 18:33
  • $\begingroup$ This the original was a good question (+1), and my guess is that the answer could go in the line of using Rasterize on a Plot without Axes and then superimpose a plot with Axes but no data. $\endgroup$
    – rhermans
    Oct 25, 2014 at 19:30
  • $\begingroup$ The linked question deals with 3D graphics, but I think halirutan's solution should adapt easily to ListPlot $\endgroup$ Oct 25, 2014 at 19:50


Browse other questions tagged or ask your own question.