The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Change xlabel of subplot with already stored figure
Replies: 8   Last Post: Sep 12, 2013 5:59 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 9,850
Registered: 6/7/07
Re: Change xlabel of subplot with already stored figure
Posted: Sep 11, 2013 8:29 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.