필터 지우기
필터 지우기

Why data cursor showing wrong values?

조회 수: 1 (최근 30일)
Tomislav
Tomislav 2012년 11월 28일
I am working with 3D axes. Previously I have modified the z and y axes. I needed to have z and y values shown reversed. Not to go from 1 to 200 bit from 200 to 1. And now data cursor fetches the old data and is not in match with on screen data.
Any help would be appreciated.
Thanks.
note: I have changed the values like this:
yLimits = get(gca,'YLim');
yTicks = yLimits(2)-get(gca,'YTick');
set(gca,'YTickLabel',num2str(yTicks.'));
  댓글 수: 1
per isakson
per isakson 2012년 11월 28일
Without checking, I think the ticklabels are just some text - could be any text. It doesn't change the underlying scale of the axis.
What more did you do to "have z and y values shown reversed"?

댓글을 달려면 로그인하십시오.

채택된 답변

Tom Lane
Tom Lane 2012년 11월 28일
Try this instead:
set(gca,'YDir','reverse')
Your way retains the y tick locations and values, and just labels them with something else. For example, it may place the string "2.0" at the spot corresponding to y=1.0.
  댓글 수: 6
Tomislav
Tomislav 2012년 11월 29일
I will check datacursormode. I would like the same result on cursor as on text labels, not the real value of 4.
Thank you for all your help.
Tomislav
Tomislav 2012년 11월 29일
I did it. previousley I have used
I=flipud(I);
and it messed things up, because it flipped the data while the labels stayed the same, and because of that I couldnt get what you were explaining.
Thank you all for your time.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by