Thread Subject: GUI Subplot/axes

Subject: GUI Subplot/axes

From: Travis

Date: 11 Jul, 2009 04:43:02

Message: 1 of 5

I have an area that either has an axes or a uipanel for subplots. Depending on what radio button you have selected one is supposed to be visible and the other isn't.

This isn't working well at all. The contourf graph on the axes remains, while the borders are not visible, even when I turn the (handle.axes1,'visible','off'), and is on top of the subplots in the uitable. Also the colorbar and title dissappear if I hit the 'Graph' button twice.

OK, now onto the subplots. I would like each one to have its own colorbar and title, but for some reason only the 2,2,4 one is getting either of them, and that appears to be a carry over from the axes plot, as soo as I hit 'Graph' on the subplot command it loses them.

I did try to use 4 smaller axes windows instead of subplot, and it ended up resizing each one, and moving them within the GUI.

Subject: GUI Subplot/axes

From: Travis

Date: 13 Jul, 2009 14:49:03

Message: 2 of 5

OK, I have solved the subplot problem (just put up 4 smaller axes instead), and just took off the colorbar as I could not get that to appear on each axes. I am still having problems with the image from the large axes remaining when I switch to the quad axes, and even when I switch back. seen here

http://img16.imageshack.us/img16/8135/41079310.png

Subject: GUI Subplot/axes

From: Jason

Date: 13 Jul, 2009 15:48:03

Message: 3 of 5

"Travis " <sinusoid2@hotmail.com> wrote in message <h3fhgv$bbu$1@fred.mathworks.com>...
> OK, I have solved the subplot problem (just put up 4 smaller axes instead), and just took off the colorbar as I could not get that to appear on each axes. I am still having problems with the image from the large axes remaining when I switch to the quad axes, and even when I switch back. seen here
>
> http://img16.imageshack.us/img16/8135/41079310.png

Travis,

You will notice in the description of the Visible property that it does NOT affect any child objects of the axis. To turn the "plot" on an axes off, you have to turn it off separately from the axis. You could find this by using findobj or allchild since you know the axes handle.

I'm going to guess that the reason your colorbar is not working is because you are using something like gca instead of referencing the axes object handle directly?

Best regards,
Jason

Subject: GUI Subplot/axes

From: Travis

Date: 13 Jul, 2009 16:09:02

Message: 4 of 5

"Jason " <jason.kaeding@hotmail.com> wrote in message <h3fkvj$3ni$1@fred.mathworks.com>...
> "Travis " <sinusoid2@hotmail.com> wrote in message <h3fhgv$bbu$1@fred.mathworks.com>...
> > OK, I have solved the subplot problem (just put up 4 smaller axes instead), and just took off the colorbar as I could not get that to appear on each axes. I am still having problems with the image from the large axes remaining when I switch to the quad axes, and even when I switch back. seen here
> >
> > http://img16.imageshack.us/img16/8135/41079310.png
>
> Travis,
>
> You will notice in the description of the Visible property that it does NOT affect any child objects of the axis. To turn the "plot" on an axes off, you have to turn it off separately from the axis. You could find this by using findobj or allchild since you know the axes handle.
>
> I'm going to guess that the reason your colorbar is not working is because you are using something like gca instead of referencing the axes object handle directly?
>
> Best regards,
> Jason

i had the colorbar set here...
surf(handles.axes6,Data.Ex,Data.Em,(squeeze(Data.X(i,:,:))),'LineStyle','none'), colorbar

on each of the plots, and it did not work. I tried a couple ways to specify that the colorbar was for handles.axes6, but they kept crashing.

I am not familiar with using the children of objects, I know they are there but have never worked with them. Could you give me an example of how to clear the plot itself please?

Subject: GUI Subplot/axes

From: Travis

Date: 14 Jul, 2009 16:24:03

Message: 5 of 5

"Travis " <sinusoid2@hotmail.com> wrote in message <h3fm6u$r7l$1@fred.mathworks.com>...
> "Jason " <jason.kaeding@hotmail.com> wrote in message <h3fkvj$3ni$1@fred.mathworks.com>...
> > "Travis " <sinusoid2@hotmail.com> wrote in message <h3fhgv$bbu$1@fred.mathworks.com>...
> > > OK, I have solved the subplot problem (just put up 4 smaller axes instead), and just took off the colorbar as I could not get that to appear on each axes. I am still having problems with the image from the large axes remaining when I switch to the quad axes, and even when I switch back. seen here
> > >
> > > http://img16.imageshack.us/img16/8135/41079310.png
> >
> > Travis,
> >
> > You will notice in the description of the Visible property that it does NOT affect any child objects of the axis. To turn the "plot" on an axes off, you have to turn it off separately from the axis. You could find this by using findobj or allchild since you know the axes handle.
> >
> > I'm going to guess that the reason your colorbar is not working is because you are using something like gca instead of referencing the axes object handle directly?
> >
> > Best regards,
> > Jason
>
> i had the colorbar set here...
> surf(handles.axes6,Data.Ex,Data.Em,(squeeze(Data.X(i,:,:))),'LineStyle','none'), colorbar
>
> on each of the plots, and it did not work. I tried a couple ways to specify that the colorbar was for handles.axes6, but they kept crashing.
>
> I am not familiar with using the children of objects, I know they are there but have never worked with them. Could you give me an example of how to clear the plot itself please?

I was able to figure it out, thank you for guiding me in the right direction

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
gui Travis 11 Jul, 2009 00:44:02
subplot Travis 11 Jul, 2009 00:44:02
axes Travis 11 Jul, 2009 00:44:02
rssFeed for this Thread

Contact us at files@mathworks.com