Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Sankalp Dayal

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

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
https://docs.google.com/file/d/0B5jOXNF7SvrgbVVESFp0ZXYzeFk/edit?usp=sharing
The one that work
https://docs.google.com/file/d/0B5jOXNF7SvrgNTZ5ZkFzdlBwcjQ/edit?usp=sharing

Thanks!

dpb <none@non.net> wrote in message <l0qogd$c3t$1@speranza.aioe.org>...
> On 9/11/2013 4:07 PM, Sankalp Dayal wrote:
>
> ...[ top posting repaired; please don't--hard conversation follow makes]...
>

> > dpb <none@non.net> wrote in message <l0qfa7$hgh$1@speranza.aioe.org>...
> >> On 9/11/2013 1:24 PM, Sankalp Dayal wrote:
> >> > I have an already stored figure which has 2 subplots. When I now
> >> open it and want to change the xlabel of first plot and use
> >>> subplot(2,1,1) it creates a new plot.
> >> >
> >> >
> >> > uiopen('figname.fig');
> >> > h = gca;
> >> > hold(h);
> >> > subplot(2,1,1);
> >> > %Here it creates a new plot instead of keeping the old one.
> >> > xlabel('Samples at 50 Hz')
> >> >
> >> >

> ...
>

> >> uiopen('figname.fig');
> >> for i=1:2
> >> h(i)= subplot(2,1,i);
> >> xlabel(h(i),'Samples at 50 Hz')
> >> end
> >>
> >> works fine here...

>
> >> Yes I had tried that before, it works for some saved figures but not for
> >> all.

>
> That's not your posted code did, precisely.
>
> Can only only debug what can see.
>
> How were the figures that work saved vis a vis the ones that don't?
> Something's clearly different in that case -- perhaps some have the two
> subplots oriented the other direction or somesuch so that the described
> behavior would be expected as it wouldn't match the previous locations
> and hence a new would be expected to be created.
>
> Need to see _exactly_ what failed and perhaps images of figures that
> did/didn't would help.
>
> --




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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.