Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: cla clearing handles from the wrong axis

$
0
0
"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

Viewing all articles
Browse latest Browse all 19628

Trending Articles