Problem Transitioning GUIDE application to MATLAB 2014b; Unexpected Error when using Data Cursor/Zoom;; Warning Message: Error updating PointDataTip.

1 view (last 30 days)
I constructed a user interface using GUIDE under MATLAB 2014a. The user interface consists of a single axes object and a number of slider bars used to control the selection of data to be displayed. The actual code used to construct the display can be summarized as:
arrayForDisplay = ... % code that makes selection of data from slider bar settings
axes(handles.axes1);
imagesc(..., arrayForDisplay, ...); % code that sets values for the x and y axes, clims
Starting my application under MATLAB 2014b, I can load data into my application and the display appears as normal. I can scroll through different selections of the data using my slider bars as normal. However, if I try to place a data cursor on the axes object displaying my data, I receive a warning that appears as:
Warning: Error updating PointDataTip. Following is the chain of causes of the error:
Extent must be a real (1x2) double vector.
The requested data cursor does not appear. In addition, I observe the same error message when I use the "Zoom in" tool to zoom into and out of my data image.
This warning message does not refer to any particular line of code, so it is not so easy to see where to start looking for problems. Any suggestions? When searching for 'PointDataTip' on the MATLAB website, the single result which was returned was not helpful.

Accepted Answer

Nick Bennett
Nick Bennett on 5 Mar 2015
When using the imagesc(x,y,C,clim) command, be sure that x and y are double under MATLAB2014b. If the arguments are single precision, the warning message I indicated will occur.
Try, for example, the code
AA = rand(100,100) figure; imagesc(single(1:100), single(1:100), AA)
When placing the data cursor on the image, you will see the error I indicated.
  3 Comments
Dev-iL
Dev-iL on 5 Jul 2015
Edited: Dev-iL on 5 Jul 2015
@Patrick - Why not plot as double and create a custom datatip that displays the value as single? This seems like a possible workaround...
Patrick Vacek
Patrick Vacek on 29 Jul 2015
@Iliya, that's basically what I ended up doing, but it's not a truly satisfactory workaround. Why can't I just have singles like we used to be able to? The entire point is that my datasets are huge but single precision is good enough, so it saves a lot of resources to just keep everything as singles. Apparently that's just too bad now.

Sign in to comment.

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!