How to get the value of 'x' from a figure?
3 views (last 30 days)
Show older comments
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
0 Comments
Answers (3)
Azzi Abdelmalek
on 12 Feb 2013
Click on your plot then type in command windows
x=get(gco,'xdata')
0 Comments
See Also
Categories
Find more on Labels and Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!