How to update a contourf plot?

13 visualizaciones (últimos 30 días)
Rafael Kübler
Rafael Kübler el 12 de Dic. de 2018
Comentada: Rafael Kübler el 13 de Dic. de 2018
Hello,
i know, how to update a surface for example in a for-loop using:
set(hSurf, 'ZData', newZData)
set(hSurf, 'CData', newCData)
but how do i update a contourf plot? Here I quess i need somehow the contour matrix and the ZData.
Thank you for your help in advance.
  1 comentario
dpb
dpb el 12 de Dic. de 2018
What effect, specifically, are you after? It appears the ContourMatrix array is read-only; whether there are callbacks internal that trigger recomputation if you change the underlying data of an object I didn't explore and the documentation doesn't explicitly say...you might have to delve much deeper into the bowels depending upon just what you're trying to do.

Iniciar sesión para comentar.

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 12 de Dic. de 2018
Similarly
[~,hc] = contourf(Z);
hc.ZData = newZdata;
I don't see a CData property for contourf
  1 comentario
Rafael Kübler
Rafael Kübler el 13 de Dic. de 2018
Yes. This works. Thanks.
Updating only ZData of the contourf is enough. The contour lines and the color change automaticly wit ZData.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Purple en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by