问题
I am trying to export a figure which includes highlighting of regions - something like this: Highlight parts of matlab plot. Unfortunately, when I export the figures to .eps files the size is of the order of ~10 MB... Thus, when I include them in a tex file, the quality is severely degraded. As expected this problem seems to occur due to the use of the area
function for the highlighting. Is there any workaround on this?
回答1:
You have transparency in your plot which requires the renderer to be OpenGL
which causes any EPS to not really be vector graphics but rather bitmaps coerced in some strange way. This is why the file size is much larger than what you would expect for vector graphics. If you open the resulting EPS file with an external editor (Illustrator, Inkscape, etc.) you will see what I am talking about. As a side-note, transparency isn't technically supported in EPS files.
Your options are really to
Save your figures as something else such as TIFF or PNG
You could try saving the figure as an EPS using
export_fig
from the file exchange but you will likely still have the same issue.Turn off transparency, save to an EPS, and use Illustrator or an external program to change the transparency and try to save as an EPS file and see if you get better results.
来源:https://stackoverflow.com/questions/38920495/exporting-figure-to-eps-file