Effacer les filtres
Effacer les filtres

How to add a point to mesh plot

22 vues (au cours des 30 derniers jours)
Yong
Yong le 5 Mar 2011
I have a .fig file which contains a mesh plot. I would like to know how I can add a new data point to the plot. For example, I would like to add (0, 0, 0) to the plot.
Thanks a lot.
  1 commentaire
Matt Tearle
Matt Tearle le 5 Mar 2011
Do you mean incorporate the new point into the mesh/surface? Or just add a single point marker onto the mesh?

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 5 Mar 2011
If it is a plot produced by mesh() then you cannot add an individual point to it as part of the mesh: mesh() requires that the z values be a matrix.
mesh() produces a surfaceplot object. You can openfig() the .fig and findobj() on the figure looking for 'type','surface' to get the handle to the plot. You can then set() the XData, YData, and YZdata properties
mesh plots apply to grids. If you do not have a grid, then you would need to use one of the plotting routines that would create a patch object. patch objects contain information not just about the coordinates but about the interconnections of the points.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by