필터 지우기
필터 지우기

How to add a point to mesh plot

조회 수: 19 (최근 30일)
Yong
Yong 2011년 3월 5일
댓글: SAM Arani 2024년 7월 11일 14:03
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.
  댓글 수: 2
Matt Tearle
Matt Tearle 2011년 3월 5일
Do you mean incorporate the new point into the mesh/surface? Or just add a single point marker onto the mesh?
SAM Arani
SAM Arani 2024년 7월 11일 14:03
What if I want to add a single point marker onto the mesh?
Consider the case where I have found several indices indicating the peaks in my surface plotted using mesh() function. Is it possible to add these markers [(x_idx,y_idx,Z_val) Pairs] onto the plot?
Another Question is how to add a marker surface (as the thresholding surface) to this mesh plot? [Even A single Constant surface having the same Z value for all indices of x and y].

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2011년 3월 5일
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.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by