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: GUI
Replies: 5   Last Post: Dec 30, 2012 1:41 AM

Advanced Search

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

Posts: 8,774
Registered: 7/26/08
Re: GUI
Posted: Dec 30, 2012 1:41 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Debora <deboralabella17@gmail.com> wrote in message <5ca12dc8-c53c-4fa6-9dbf-79cf392ba935@googlegroups.com>...

> [q w]=size(AV);
> for i=1:w
> AV(:,i)=AV(:,i)+((i-1)*MAX1);
> figure (1);
> subplot(2,1,1)
> hold on
> plot(AV(:,i),my_colors{i})
> ...
>
> end
>
> but this way I open a window with the graphic, and I want it on the interface. how should I do?


If you want to plot on the GUI, you need to create an AXE which has the GUI figure as Parents (usually it names handles.figure1 inside the callback), then use the handle of the AXE to plot. Do not create a new figure with figure(1) command. If you use GUIDE, you have the axe button on the left panel to add an axe.

...
ax = subplot(2,1,1, 'Parent', handles.figure1)
hold(ax, 'on');
plot(ax,AV(:,i),my_colors{i});
...

Bruno



Date Subject Author
12/28/12
Read GUI
Debora
12/28/12
Read Re: GUI
Jan Simon
12/29/12
Read Re: GUI
Debora
12/29/12
Read Re: GUI
ImageAnalyst
12/30/12
Read Re: GUI
Bruno Luong
12/29/12
Read Re: GUI
Debora

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.