Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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 回表示 (過去 30 日間)
Brian Malone
Brian Malone 2020 年 3 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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?

回答 (1 件)

Samatha Aleti
Samatha Aleti 2020 年 3 月 23 日
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;

この質問は閉じられています。

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by