フィルターのクリア

Data Cursor Position Does not Match Mouse Position in Figure Zoom

4 ビュー (過去 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 Center および File ExchangeVisual Exploration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by