필터 지우기
필터 지우기

Datacursormode

조회 수: 2 (최근 30일)
Manu MJ
Manu MJ 2011년 10월 28일
Dear friends,
I have created many sub axes(grids) in the figure window.
When i set the datacursormode on, instead of showing the value of the graph where I point, it shows the position of the sub axes which is under the plotted graph.
What best I can do to over come this problem.
Please suggest me. Thanks in advance.
Your's Friend Manu MJ

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 10월 28일
What is "sub axes (grids)"? Do you mean subplot? Or did you actually plot the grid lines? I don't see problem in this example.
f=figure(1);
s1=subplot(2,1,1);
plot(1:10);grid on;
s2=subplot(2,1,2);
plot(magic(3));grid on;
datacursormode on;
  댓글 수: 2
Manu MJ
Manu MJ 2011년 10월 31일
It's not like this, In a figure window there is only one figure. I have created small grids in the figure window manually. Instead of showing position of the graph, datacursor is showing the position of the small grids which i had created.
Fangjun Jiang
Fangjun Jiang 2011년 10월 31일
That is the problem. MATLAB treat your "graph" and the grid lines that you drawn the same as the curves in the figure. Why do you need to drawn the grid lines? The grid on is not good enough? If that is the case, you may just have to move your cursor very carefully to point to the data points on your "graph", not on the grid lines.

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

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by