Last active
January 19, 2022 12:17
-
-
Save soypat/1f090f43261dbeea3f03221578788a6d to your computer and use it in GitHub Desktop.
Force matlab to save .eps without rasterizing vector graphics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plot3(X,Y,Z) %Plot your awesome plot | |
set(gcf,'renderer','Painters') % 1) Change the renderer of the figure before you draw your figure or before you export. You can use the following command>> | |
% 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: | |
print -depsc -tiff -r300 -painters <filename>.eps % modify <filename> to your hearts desire | |
% modular filename way: | |
print('-depsc','-tiff','-r300', '-painters',[filename,'.eps']) | |
%% Obtained from: https://www.mathworks.com/matlabcentral/answers/92521-why-does-matlab-not-export-eps-files-properly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would recommend to use
'ContentType','vector'
of https://de.mathworks.com/help/matlab/ref/exportgraphics.htmlan example:
Best Regards