I have plotted a colored figure using contourplot. What is the best way to save it so that its quality becomes higher? I want it use in Latex.
Asked
Active
Viewed 854 times
1
1 Answers
3
If you use pdflatex, I recommend:
- PDF for line art
- PNG when PDF doesn't produce an acceptable result
- JPEG for photos
Use Export instead of Save Graphics As.
plot = ContourPlot[x^2 + y^2, {x, -1, 1}, {y, -1, 1}]
First try
Export["plot.pdf", plot]
If the result is not acceptable, try
Export["plot.png", plot, ImageResolution -> 4*72]
The default image resolution is 72 dpi. Use 4*72 to get a four times larger image. Find the correct size for your needs.
See also:
Export["fig.pdf", plot]; or with.epsif you prefer. – corey979 Jan 16 '17 at 14:02.pngtypically works well. – bbgodfrey Jan 16 '17 at 20:15