From: John on
Howdy!

I have a GUI which plots some data on a data axes. It would be awesome if I had the same editting power as I do when I generate a plot to a Figure. Is there a way for me to do this?

For example, in the command window, when I enter...

x = [1:100]
y = pi*(x.^2)
plot(x,y)

....Figure 1 is generated with all types of interactive tools.

But, in my GUI, when I plot my data to my axis...

plot(handles.data_axes, x, y)

....I cannot interact with the plot.

Am I able to interact with a plot in a GUI???

Thanks!!!
From: Steven Lord on

"John " <jfishbac(a)gmail.com> wrote in message
news:i14o7l$cbb$1(a)fred.mathworks.com...
> Howdy!
>
> I have a GUI which plots some data on a data axes. It would be awesome if
> I had the same editting power as I do when I generate a plot to a Figure.
> Is there a way for me to do this?
>
> For example, in the command window, when I enter...
>
> x = [1:100]
> y = pi*(x.^2)
> plot(x,y)
>
> ...Figure 1 is generated with all types of interactive tools.

Yes, the default figure toolbar.

> But, in my GUI, when I plot my data to my axis...
>
> plot(handles.data_axes, x, y)
>
> ...I cannot interact with the plot.

Sure you can. The default figure toolbar is not displayed in a figure that
contains a uicontrol by default, but you can enable it by changing the
figure's Toolbar property. You can also interact with the plot using the
callback functions of the other components of your GUI if you want.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#Toolbar

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: John on
"Steven Lord" <slord(a)mathworks.com> wrote in message <i14os7$o3f$1(a)fred.mathworks.com>...
>
> "John " <jfishbac(a)gmail.com> wrote in message
> news:i14o7l$cbb$1(a)fred.mathworks.com...
> > Howdy!
> >
> > I have a GUI which plots some data on a data axes. It would be awesome if
> > I had the same editting power as I do when I generate a plot to a Figure.
> > Is there a way for me to do this?
> >
> > For example, in the command window, when I enter...
> >
> > x = [1:100]
> > y = pi*(x.^2)
> > plot(x,y)
> >
> > ...Figure 1 is generated with all types of interactive tools.
>
> Yes, the default figure toolbar.
>
> > But, in my GUI, when I plot my data to my axis...
> >
> > plot(handles.data_axes, x, y)
> >
> > ...I cannot interact with the plot.
>
> Sure you can. The default figure toolbar is not displayed in a figure that
> contains a uicontrol by default, but you can enable it by changing the
> figure's Toolbar property. You can also interact with the plot using the
> callback functions of the other components of your GUI if you want.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#Toolbar
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com
>
I gave this a shot by going into the axes' create function and entering...

set(hObject,'Toolbar','figure')

....but got an error saying there is no 'Toolbar' property in the 'axes' class.

Am I missing something?

Thanks again!
From: matt dash on
"John " <jfishbac(a)gmail.com> wrote in message <i14pu0$5ak$1(a)fred.mathworks.com>...
> "Steven Lord" <slord(a)mathworks.com> wrote in message <i14os7$o3f$1(a)fred.mathworks.com>...
> >
> > "John " <jfishbac(a)gmail.com> wrote in message
> > news:i14o7l$cbb$1(a)fred.mathworks.com...
> > > Howdy!
> > >
> > > I have a GUI which plots some data on a data axes. It would be awesome if
> > > I had the same editting power as I do when I generate a plot to a Figure.
> > > Is there a way for me to do this?
> > >
> > > For example, in the command window, when I enter...
> > >
> > > x = [1:100]
> > > y = pi*(x.^2)
> > > plot(x,y)
> > >
> > > ...Figure 1 is generated with all types of interactive tools.
> >
> > Yes, the default figure toolbar.
> >
> > > But, in my GUI, when I plot my data to my axis...
> > >
> > > plot(handles.data_axes, x, y)
> > >
> > > ...I cannot interact with the plot.
> >
> > Sure you can. The default figure toolbar is not displayed in a figure that
> > contains a uicontrol by default, but you can enable it by changing the
> > figure's Toolbar property. You can also interact with the plot using the
> > callback functions of the other components of your GUI if you want.
> >
> > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#Toolbar
> >
> > --
> > Steve Lord
> > slord(a)mathworks.com
> > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> > To contact Technical Support use the Contact Us link on
> > http://www.mathworks.com
> >
> I gave this a shot by going into the axes' create function and entering...
>
> set(hObject,'Toolbar','figure')
>
> ...but got an error saying there is no 'Toolbar' property in the 'axes' class.
>
> Am I missing something?
>
> Thanks again!

It's a figure property, not an axes property. Put it in the opening_fcn.