|
Hi
Try to use hgexport instead.
"Xavi Alonso" <gargle777@hotmail.com> wrote in message
<g7sa0f$g06$1@fred.mathworks.com>...
> Hello,
> I'm trying to get the same axis Position in two different
> figures with different axis labels and tick labels. To my
> surprise, matlab changes the Position property of the axes
> in the figure when saving to an eps or png file (this
> happens when I use large font size), sometimes giving
> negative values for the axis width and/or height, which
then
> gives an error when I try to assign them to the Position
> property of the axis of another figure.
> For example:
>
> fh=figure;
> plot.....
> ....
> ca=get(fh,'CurrentAxes');
> pos_vect=get(ca,'Position')
> saveas(fh,figure_name,'png');
> get(ca,'Position')
>
> returns
>
> pos_vect =
>
> 0.2154 0.1435 0.6896 0.7815
>
> ans =
>
> 0.8635 0.7739 -2.3404 -2.0152
>
> I don't have any ResizeFcn defined, and setting
> 'PaperPositionMode' to 'auto' doesn't help either.
> I can use the Position property before saving for
assigning
> to the axis of another figure, but the result is not as
> expected (the axis of the saved figure has actually been
> resized by the saveas command).
> I guess that my problem could be related to the last
> (unanswered) question in this thread
>
> http://www.mathworks.com/matlabcentral/newsreader/
view_thread/151519
>
> I'm using Matlab 7.1.0.183 (R14) Service Pack 3
> Thank you very much and best regards
>
> Xavi
|