"Bruno Luong" <email@example.com> wrote in message <firstname.lastname@example.org>... > "Scott" wrote in message <email@example.com>... > > > When I do this, it does exactly what it is supposed to do for the second figure, but it also, somehow, changes the array of patch handles for the main GUI window too. Suddenly, many of them are no longer valid handles which messes up downstream GUI functions. (before, a call to ishandle for the handles array gives all 1s. After, there are strings of 0s). > > I think you confuse: MATLAB does not change the handles of patches, it actually left unchanged those patches, which is no longer exist since you clear the axes. > > You need to manage those handles coherently (using GUIDATA function, for example). It's your job to do so, MATLAB won't do it for you. > > Bruno
My language was imprecise. I cleared the axes of the axes on the 2nd figure. But I explicitly specified that axis:
So it shouldn't touch any handles of patches that are associated with the primary axis, or so I would assume.
And yet, I have an array of 500 or so handles to patch objects that are all children of the primary axis. If I do: