Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How can I get the ordinal value of the most recent subplot that a user clicked (now that gca has been updated to return an object not a double)?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I had previously used gca to return a numerical value, but now it returns an object.
I need to get the ordinal value of a subplot.
What should I do instead?
0 Kommentare
Antworten (1)
Samatha Aleti
am 23 Mär. 2020
Hi,
According to my understanding you want to obtain the ordinal values of current axes in a plot. You can do that by referring the object’s (gca) properties. Here is a sample code:
% plot data
x = [1:4];
y = [2:2:8];
plot(x,y);
% get Ordinal values
ax = gca;
xOrd = ax.XLim;
yOrd = ax.YLim;
0 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!