Set x, y, z data in trimesh without re-plotting

1 Ansicht (letzte 30 Tage)
Daniell Algar
Daniell Algar am 31 Jan. 2013
Hi there,
I'm working on a function that plots a set of data continuously during mouse press. I draw the data with (in short)
tri= DelaunayTri(x, y);
h= trimesh(tri, x, y, z);
I essentially wish to update the z value upon mouse press on given (x, y), by using the set() command. My problem is that I can't seem to understand how the trimesh is built up, even though I've read the documentation. The call
>>get(h)
...
XData = [ (3 by 5972) double array]
...
etc., and I don't understand how I should pass my vector (x, y, z)-values into the
set(h, 'XData', ????)
Greatly thankful for guidance and help.
Thank you!
  1 Kommentar
Merlin Mifsud
Merlin Mifsud am 15 Mär. 2013
X = get(h, 'XData');
X = [X (new value to plot)];
set(h, 'XData', X);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by