Date: Sep 11, 2013 8:29 PM
Author: dpb
Subject: Re: Change xlabel of subplot with already stored figure

On 9/11/2013 6:22 PM, Sankalp Dayal wrote:

Do NOT toppost... :(

> I tried the exactly the same thing that was suggested but still it
> doenst work. I have uploaded the files here

> The one that doesnt work
> The one that work


Hmmm....same symptoms here, indeed. I can only conjecture something's
different in the way the two were manipulated prior to saving -- like
the positions of the axes were modified just enough to cause a floating
point mismatch in the size comparison inside subplot() when it opens the
one that thinks it's not the same position as the first.

I see two workarounds --

a) Find out what actually is causing the above symptom -- I'd start by
using the default positions for subplot() and make the one that fails
again and look at the position vector there and compare that to that of
the saved version... or,

b) Load the figures and then use the handles to the axes objects
directly -- I think it will depend on how they were created as to the
order but in the one that failed the two plot axes object handles are
the 2nd and 4th and the legends are the 1st and 3rd...

xlabel(hax(2),'new label 1')
xlabel(hax(4),'other new label')

works as expected here while I do see the problem you outline on the
subplot() open not recognizing the existing axis should seemingly match.