This is a followup question to this answer.

The code works great but I now want to export the resulting DensityPlot. I have tried clicking the plus on the right of the image and selecting paste snapshot and then to export it to an .eps using Export["~/Desktop/img.eps",%]. This created an image on my desktop but it was 97 Mb.

Is there a more simple way to export this plot and also to have a smaller file?

  • $\begingroup$ I can't test it at the moment, but this sounds like it could be solved by the rasterizeBackground function from this question $\endgroup$
    – Lukas Lang
    Jul 7 '21 at 17:08
  • $\begingroup$ Why not define your fig: myFig = DensityPlot[..] then Export[~/Desktop/img.eps, myFig, "EPS"]? Try that. If it is too large, try .../img.png, myFig, "PNG"] $\endgroup$ Jul 8 '21 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.