Filter löschen
Filter löschen

Ginput without the crosshairs?

5 Ansichten (letzte 30 Tage)
Brian
Brian am 8 Okt. 2014
Beantwortet: Brian am 8 Okt. 2014
Hello, I was wondering if it was possible to get the coordinates inside an axes plot using something like ginput, but without the crosshairs.
What I do is plot a 128x128 surf plot, and I'd like to get the coordinates in the 128x128 grid just with a mousebuttondownfnc callback. Ideally, I could get the x and y coordinates, which I would then use in conjunction with another utility where I would update other axes.
Is something like ginput without the crosshairs available?
Thanks!

Akzeptierte Antwort

Brian
Brian am 8 Okt. 2014
Nevermind, this one was ridiculously easy once I read properly through the documentation.
The command I found that worked was:
d = get(gca,'CurrentPoint');
to get the coordinates, d in my case was a 2-element array for x and y.

Weitere Antworten (0)

Kategorien

Mehr zu Visual Exploration finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by