How can I obtain the coordinates(x,y) from my plot?

조회 수: 2 (최근 30일)
Lukumon Kazeem
Lukumon Kazeem 2012년 6월 28일
I have a written a program which utimately plots a graph for me. I wish to obtain the x and y coordinates of desired points on my graph. How can I do this?

답변 (1개)

Honglei Chen
Honglei Chen 2012년 6월 28일
편집: Honglei Chen 2012년 6월 28일
You can try to get the handle of the plotted object and then get XData and YData out of it. Here is an example
h = plot(1:10)
get(h,'XData')
get(h,'YData')
In your case, you may need to go down the hg tree to find the object you need.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by