How to get the value of 'x' from a figure?
이전 댓글 표시
Hello,
I'm trying to get the value of the x axis from a figure. I am currently using gtext, is there another way?
Cheers
답변 (3개)
Azzi Abdelmalek
2013년 2월 12일
Click on your plot then type in command windows
x=get(gco,'xdata')
Depending on what you need, try
xlim
or
get(gca, 'XTick')
카테고리
도움말 센터 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!