|||
省流:
set(gcf,'renderer','Painters');
**
引自: Why does MATLAB not export EPS files properly? - (mathworks.cn)
The renderer that MATLAB is using to display the images is very likely a bitmap renderer such as OpenGL or zbuffer (the figures you sent me used the ‘zbuffer’ renderer). EPS formats are essentially vector formats so it is best if the renderer that you use to generate the figure is also a vector renderer ('painters').
As you are likely using a bitmap renderer, MATLAB has to first convert the bitmap into a vector, and this conversion of bitmaps to vector images is often a time-consuming and inefficient process.
This is why your images appear incorrect when you print them.
SOLUTION:
1) Change the renderer of the figure before you draw your figure or before you export. You can use the following command:
ThemeCopy
>>set(gcf,'renderer','Painters')
2) Change the renderer used by the PRINT command. By default it uses the same renderer that the figure uses, so you would have to type the following command to over-ride this:
ThemeCopy
>> print -depsc -tiff -r300 -painters <filename>.eps
or
ThemeCopy
>> print -depsc2 -tiff -r300 -painters <filename>.eps
Also, I suggest you use a PostScript printer or viewer to view your EPS files. This is just to make sure that you are viewing your actual EPS file and not the TIFF preview.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-20 03:52
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社