From: Oliver Woodford on 27 May 2010 10:09 "Alwin van Steensel" wrote: > Hi everyone, > > I have a problem concerning saving the figures/plots I create with Matlab that I beleive should not be so hard to solve. However I have been unable to do so despite of searching the help file, internet and trying multiple commands. > > I can be very specific about what I wánt to acheive. What I want is the matlab code that does exactly the same as if I would manually save a figure; thus if I would use file-->save as... > > I'm mainly inerested in saving *.eps files in this manner. I've already tried the functions print and saveas but the results differ from saving it manually. For example the axis are rescaled and I'm not sure if the font sizes are equal as the way I created them in the original figure, also the legend box is always to small and the 'edgecolor' cannot be set. > > Possibly it is just some settings or some additional parameters that would solve my problem but I cannot find a solution anywhere. > > Does anyone know what the code is what I'm looking for or what the the operation file-->save as... actually dóes. > > Thanks in advance! > > Alwin van Steensel Try export_fig: http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig
From: Rich Ellis on 27 May 2010 13:44 The size of an exported graph is controlled by the figure PaperPosition. To export a graph that matches the size of the figure on the screen, issue this command: set(gcf,'PaperPositionMode','auto') then issue the print command. If you are printing to a bitmap formate, like png, specify the resolution a 0 (which means use screen resolution): print -dpng -r0 myGraph.png When using a vector formate, like eps, do not specify a resolution because you can use the default (something like 864 dpi) for vector graphics. A Tiff preview might be helpful (-tiff): print -epsc -tiff myGraph.eps "Alwin van Steensel" <g.a.vansteensel(a)student.tudelft.nl> wrote in message news:htlo95$kir$1(a)fred.mathworks.com... > Hi everyone, > > I have a problem concerning saving the figures/plots I create with Matlab > that I beleive should not be so hard to solve. However I have been unable > to do so despite of searching the help file, internet and trying multiple > commands. > > I can be very specific about what I w�nt to acheive. What I want is the > matlab code that does exactly the same as if I would manually save a > figure; thus if I would use file-->save as... > I'm mainly inerested in saving *.eps files in this manner. I've already > tried the functions print and saveas but the results differ from saving it > manually. For example the axis are rescaled and I'm not sure if the font > sizes are equal as the way I created them in the original figure, also the > legend box is always to small and the 'edgecolor' cannot be set. > Possibly it is just some settings or some additional parameters that would > solve my problem but I cannot find a solution anywhere. > > Does anyone know what the code is what I'm looking for or what the the > operation file-->save as... actually d�es. > > Thanks in advance! > > Alwin van Steensel >
First
|
Prev
|
Pages: 1 2 Prev: Sort by clicking on column heading in uitable? Next: simulate backward-euler in .m file |