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일)
이전 댓글 표시
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
답변 (1개)
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;
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!