how to fix the current axes in gui?

4 Ansichten (letzte 30 Tage)
Osama Alkurdi
Osama Alkurdi am 2 Apr. 2020
Kommentiert: Osama Alkurdi am 4 Apr. 2020
I have a gui contains two axes, one of them are used to plot a mechanical motion for a certain mechanisms over a period of time, and when the animation starts the plot start to apear at axes1, but if I click at axes2 the animation start to appear at it, it seems that when any axes get clicked, it becomes the current one.
the problem is that I want the animation always appear at axes1 no matter if I clicked at any other axis, but I have to mention something important that I can't use plot(handels.axes1,.....,.....) or axes(handles.axes1).
is there is a command that can off or inactice a certain axes?
like this command which could off a certain pushbutton, set(handles.pushbutton1,'enable','off').
  19 Kommentare
Rik
Rik am 3 Apr. 2020
In GUIDE generated code your callbacks will have the handles matrix available. If you decide to take the unfortunate route of doing things like calling clear at the beginning of the function you can get it back with this:
handles=guidata(gcbf);
Osama Alkurdi
Osama Alkurdi am 4 Apr. 2020
@Rik
@Adam Danz
@Walter Roberson
Thank you Guys :)
I finally understand what you mean after studying your comments and searching in the web, @Rik your solution work perfectly for me, and I know how to implement it in my code.
I learned a new things in matlab, thank you again.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by