필터 지우기
필터 지우기

Data Cursor Position Does not Match Mouse Position in Figure Zoom

조회 수: 9 (최근 30일)
Joe
Joe 2015년 1월 13일
댓글: Alexandra Vossen 2017년 9월 9일
Hello,
I am using Matlab 2014b and I am reading in a large csv text file. The file size is 3000 x 4224. When I open the file using:
img = csvread(filename);
img = img';
figure1 = imagesc(img);
I get the normal figure window opening and the correct image in the figure. Selecting the Data Cursor, I can click anywhere in the image a retrieve the value of the 'pixel' I have selected. When I zoom in though, the Data Cursor goes crazy. When I select a pixel to get it's value, the data cursor selects a point far away from the pixel I selected.
It's almost as if the Figure window thinks my zoomed selection is still the entire image, that is, the mouse selection and Data Cursor have been decoupled so that if I select the left and right edges of my zoomed area, the Data cursor selects the left and right edges of the entire unzoomed image. This causes the data cursor to select points that are not visible in my zoomed image.
I tried using a new figure with imagesc(rand(100)) and the issue is not present, so I am thinking it might be because I am reading in a csv file?
The problem also exists if I remove:
img = img';
Any ideas? Thanks!
I also just tried saving my data as an ASCII file. I then used DLM read to open the ASCII file, and using imagesc, the problem still persists.
  댓글 수: 2
Mark Veillette
Mark Veillette 2015년 1월 21일
I am also experiencing this issue. I'm only seeing it for "large" images. Even doing
imagesc(rand(3000))
will duplicate this.
Alexandra Vossen
Alexandra Vossen 2017년 9월 9일
Hi,
I know this is an old thread but I have a similar problem now in MATLAB2017a so I thought they might be related.
When I try to zoom into a graph, the zoom window that is drawn on the figure and the virtual window "drawn" by the cursor do not match, and the figure will zoom onto the virtual rather than the actually drawn window. This only seems to happen in full screen mode, while the amount of data plotted seems to be irrelevant (it happens for a plot of a single data point). I'm running Matlab on Linux version 4.9.48-1-MANJARO (64bit).
What could be causing this behaviour?
Thanks!

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

채택된 답변

Jinsheng
Jinsheng 2015년 4월 28일
I just contacted the Mathworks group and they were able to fix this: It's a bug of version 2014b, and they have a patch for it:
https://www.mathworks.com/support/bugreports/1133258
Just want to post the answer here in case other people have the similar issue.

추가 답변 (2개)

Jinsheng
Jinsheng 2015년 4월 28일
same issue here as well. I think it's specific for large images and 2014b.

Joe
Joe 2015년 4월 28일
We upgraded to 2015a, and I when I do a
imagesc(rand(2000))
I do not get the issue any more. So I believe that yes, issue is specific to 2014b

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by