필터 지우기
필터 지우기

How to plot values from 1st column in 2-D plot?

조회 수: 2 (최근 30일)
Rob
Rob 2013년 5월 12일
I have a matrix Positions =
1 246 242
2 246 19
3 217 120
4 45 159
5 198 126
6 156 198
7 292 189
8 195 88
9 241 130
10 137 5
11 130 296
12 248 51
13 26 32
14 40 112
15 53 60
16 118 147
17 250 102
First column presents a node. Second X position of a node and third Y position. I know how to plot position of nodes in X-Y graph like this: <https://dl.dropboxusercontent.com/u/22357708/XXScrCap-0266.jpg>
But I don't know (yet) how to plot the first column number (1:17) instead of *
Thanks in advance for your time & help.
  댓글 수: 1
Rob
Rob 2013년 5월 12일
If you'd like to see the attached picture, just copy&paste the link into a newly opened browser tab.

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

채택된 답변

the cyclist
the cyclist 2013년 5월 12일
You are trying to plot the node number as a label? If so, then you could use the text command
for n = 1:length(Position)
text(Position(n,2),Position(n,3),num2str(Position(n,1)))
end
This will probably overlap the plot symbol a little, so you might want to offset a bit.
doc text
for details.
  댓글 수: 1
Rob
Rob 2013년 5월 13일
Thanks a lot.
Yes it did overlaped a little, so I changed to
text(Position(n,2)+3,Position(n,3),num2str(Position(n,1)))

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by