how to fix the current axes in gui?

5 views (last 30 days)
Osama Alkurdi
Osama Alkurdi on 2 Apr 2020
Commented: Osama Alkurdi on 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 Comments
Rik
Rik on 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 on 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.

Sign in to comment.

Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!