[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mesh handles not working?
From: |
John W. Eaton |
Subject: |
mesh handles not working? |
Date: |
Wed, 7 Mar 2007 13:11:25 -0500 |
On 6-Mar-2007, Daniel J Sebald wrote:
| I think that mesh() in CVS isn't working correctly in terms of the
| handles. It appears the handle from __uiobject_get_handle__.m is
| returning a handle value which is one too high so that every time
| mesh() is called the old surface remains.
|
| There may also be another problem inside __uiobject_draw_axes__.m
| with surfaces but I can't get that far to isolate things.
|
| Anyway, I think the problem is near lines 106 to 111, but these
| globals with lock and unlock is too much for me to follow at the
| moment.
All the files that use the globals directly are generated
automatically from the corresponding .in files. But anyway, those are
all going away in favor of managing the properties in C++. Doing all
of that bookkeeping in the scripting language was a noble experiment,
but I think the "Matlab language" is just not up to the task.
| Plus I probably wouldn't come up with a good fix. The
| attached patch is simply to show where the problem lies. Try the
| following code:
|
| figure(1);
| x = ones(3,1) * [0:2];
| y = x';
| z = x.*y;
| mesh(x,y,z);
| x = ones(21,1) * [0:20];
| y = x';
| z = x.*y;
| mesh(x,y,z);
|
| figure(2);
| plot([0:30],-[0:30]);
| plot([0:30],[0:30]);
|
| Notice how the first lines add another number to the kids list. The second
doesn't.
I think the fix is just ot add a call to newplot at the beginning of
mesh.m.
jwe