1
$\begingroup$

Suppose I have a density plot which I want to export in EPS format. But when tried using command, Export["/home/1.eps", %263, "EPS"] , the exported image has very large size (~100MB). How can I export the image with a size ~1 MB? Someone kindly help me to solve this problem.

$\endgroup$
4
  • 2
    $\begingroup$ try the option ImageResolution with different settings in Export, e.g. plot = Plot[{Sin[x], Cos[x]}, {x, 0, 2 Pi}, Filling -> Axis]; Export["plotir20.eps", plot, ImageResolution -> 20]; Export["plotir100.eps", plot, ImageResolution -> 100];? $\endgroup$
    – kglr
    Aug 25, 2019 at 14:02
  • $\begingroup$ If you can, try to export to PDF instead. That applies automatic image compression. $\endgroup$ Aug 25, 2019 at 14:37
  • $\begingroup$ Thanks for the reply. Your reply solved my problem. $\endgroup$
    – atanu
    Aug 25, 2019 at 17:15
  • $\begingroup$ atanu, posted the comment as an answer. $\endgroup$
    – kglr
    Aug 25, 2019 at 22:37

1 Answer 1

1
$\begingroup$

Use the option ImageResolution in Export:

plot = Plot[{Sin[x], Cos[x]}, {x, 0, 2 Pi}, Filling -> Axis]; 

Compare the two files:

Export["plot20.eps", plot, ImageResolution -> 20] 

Export["plot100.eps", plot, ImageResolution -> 100]
$\endgroup$
1
  • $\begingroup$ Yes. I have tried it and it works fine. Thanks for the reply. $\endgroup$
    – atanu
    Aug 27, 2019 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.