how to export the figure to color eps in matlab
Asked Answered
S

3

14

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.

Slash answered 11/6, 2012 at 18:58 Comment(0)
K
14

The following works for me:

print -depsc myplot.eps
Kinsley answered 11/6, 2012 at 19:24 Comment(0)
O
35

Just combine @mola's answer with what you've got already:

saveas(gca, 'myplot.eps','epsc');

Note the c in 'epsc'.

Ocana answered 2/9, 2013 at 18:52 Comment(0)
K
14

The following works for me:

print -depsc myplot.eps
Kinsley answered 11/6, 2012 at 19:24 Comment(0)
K
2

Here is what you are looking for:

http://www.mathworks.se/matlabcentral/fileexchange/23629-exportfig

Kinsley answered 11/6, 2012 at 19:1 Comment(1)
thanks. I am just wondering if there is any way to do that with built-in matlab function.Slash

© 2022 - 2024 — McMap. All rights reserved.