Matlab 2014b does not allow single-precision axes for datacursormode on imagesc

In older versions of Matlab (pre-2014b), you could use imagesc with single-precision data, x axis, y axis, and clims and use datacursormode with no problem, just like if you used double-precision values. Now, if the x or y axis is single-precision, using datacursormode and clicking on the image yields an error:
Error using matlab.graphics.shape.internal.util.ImagePoint/set.XData (line 63)
Extent must be a real (1x2) double vector.
Error in matlab.graphics.shape.internal.util.ImagePoint (line 54)
The data itself need not be double; it can still be single. Why do I have to convert the axes to doubles? This seems unnecessary to me.

Answers (0)

Products

Asked:

on 4 May 2015

Community Treasure Hunt

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

Start Hunting!