I have a plot in Matlab needed to save the eps format. If I use the interactive menu in the figure to do so, everything is going all right, the exported eps is good. But if I use the following command
saveas(gca, 'myplot.eps','psc2');
But if I do in this way, the exported eps is not clipped and the margin is too big. How to save the eps without margin in the program? Thanks.
BTW, if I use the following code instead
saveas(gca, 'myplot.eps','eps');
then the output eps is clipped but it is black and white instead of color.
Save Figure as EPS FileCreate a bar chart and save it as an EPS file. Specify the 'epsc' driver to save it in color. saveas saves the bar chart as Barchart. eps .
Use the File > Export Setup dialog. Use Edit > Copy Figure to copy the figure's content to the system clipboard. For details, see Customize Figure Before Saving and Copy Figure to Clipboard from Edit Menu.
The Encapsulated PostScript (EPS) vector format is the most reliable and consistent file format MATLAB supports.
To save a figure as an image at a specific resolution, call the exportgraphics function, and specify the 'Resolution' name-value pair argument. By default, images are saved at 150 dots per inch (DPI). For example, create a bar chart and get the current figure. Then save the figure as a 300-DPI PNG file.
Just combine @mola's answer with what you've got already:
saveas(gca, 'myplot.eps','epsc');
Note the c in 'epsc'
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With