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$
  • 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 '19 at 14:02
  • $\begingroup$ If you can, try to export to PDF instead. That applies automatic image compression. $\endgroup$ – Henrik Schumacher Aug 25 '19 at 14:37
  • $\begingroup$ Thanks for the reply. Your reply solved my problem. $\endgroup$ – atanu Aug 25 '19 at 17:15
  • $\begingroup$ atanu, posted the comment as an answer. $\endgroup$ – kglr Aug 25 '19 at 22:37
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]
|improve this answer|||||
$\endgroup$
  • $\begingroup$ Yes. I have tried it and it works fine. Thanks for the reply. $\endgroup$ – atanu Aug 27 '19 at 16:15

Your Answer

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

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