I want to save the assigned labels in a 3d scatter plot

조회 수: 1 (최근 30일)
RAJA SEKHAR BATTU
RAJA SEKHAR BATTU 2023년 12월 3일
편집: Dyuman Joshi 2023년 12월 5일
I have 180 coordinates x,y,z. and I assigned labels from 1:180. This shows that I have 180 coordinate points. After the plot, It plots like a rectangular matrix with the labels (used text function to assign the labels on the plot) at different positions according to the the coordinates.
I want to save the rectangular matrix with the assigned labels in the plot. I want the map of labels as a matrix.
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2023년 12월 3일
"I want to save the rectangular matrix with the assigned labels in the plot."
Save as what? an array? or in a data file e.g. excel? or something else?
RAJA SEKHAR BATTU
RAJA SEKHAR BATTU 2023년 12월 3일
@Dyuman Joshi If we can get the matrix to workspace I know how to save. Hope you understand the question.

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

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 12월 3일
If understood your question, is this what you are to get with your plot:
D = readtable('DBOOK.xlsx');
X = D{:,2};
Y = D{:,3};
Z = D{:,4};
S = repmat(100,numel(X),1);
Size_M=S(:);
scatter3(X,Y,Z, Size_M);
text(X, Y, Z, D.Parameter, 'Vert','bottom', 'Horiz','left', 'FontSize',11)
xlabel('X values')
ylabel('Y values')
zlabel('Z values')
  댓글 수: 2
RAJA SEKHAR BATTU
RAJA SEKHAR BATTU 2023년 12월 3일
Hi @Sulaymon Eshkabilov Thank you for your answer. you partially understood the question. Yes, In my case my plot looks like a rectangle. I want the numbers assigned to get as a matrix in workspace. see the attached picture.
Dyuman Joshi
Dyuman Joshi 2023년 12월 5일
편집: Dyuman Joshi 2023년 12월 5일
@RAJA SEKHAR BATTU How did you assign the labels?
Can you share your code that produced the above plot?

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

카테고리

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