Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Scott
Posts:
15
Registered:
10/31/12


Re: cla clearing handles from the wrong axis
Posted:
Feb 24, 2013 3:14 PM


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kgdqnq$d5q$1@newscl01ah.mathworks.com>... > FYI I understood what happens. > > Bruno
So what I'm not understanding then about your answer are a few things:
Why does it only touch some of the handles of the main figure window/axis?
Why should it touch the handles of the main figure window/axis at all? They aren't associated with the second axis. I thought the one of the points of specifying an axis on cla() was so that only that axis was affected.
I do use guidata. But this change happens within a function right after I have called cla()
Then I use guidata at the end of the function like this:
guidata(myData.mainWindowFigHandle, myData) [myData contains the handles for the whole GUI] guidata(myData.window2Handles.figHandle,myData.window2Handles) [myData.window2Handles just contains the handles associated with the 2nd window]
but the change that occurs well up in the function persists after the guidata has been called and the function is exited, so I don't see how it can have to do with guidata.
cla() seems like the quickest and most efficient way to clear the 2nd figure so I can plot different data on it. It works really well for that but seems to give me this unfortunate bug.
Thanks



