How can I display numbers with higher precision in a MATLAB data cursor?

Your data isn't losing precision, the Data Cursor display just isn't showing the full precision so that the text boxes are a more reasonable size. However, if you want to increase the precision of the display in the text datatip, you can customize it.

If you right click on a Data Cursor text box, you should see a menu like this:

enter image description here

If you then select the Edit Text Update Function... option, it will open a default m-file containing the following:

function output_txt = myfunction(obj, event_obj)
% Display the position of the data cursor
% obj          Currently not used (empty)
% event_obj    Handle to event object
% output_txt   Data cursor text string (string or cell array of strings).

pos = get(event_obj, 'Position');
output_txt = {['X: ', num2str(pos(1), 4)], ...
              ['Y: ', num2str(pos(2), 4)]};

% If there is a Z-coordinate in the position, display it as well
if length(pos) > 2
    output_txt{end+1} = ['Z: ', num2str(pos(3), 4)];
end

Notice that the text for the X and Y coordinate data is formatted using num2str, with the second argument being a 4. This converts the coordinate value to a string representation with 4 digits of precision. If you want more digits displayed, simply increase this number, then save the newly-created m-file on your path.

Now your datatip text should display more precision for your numbers. If you want to accomplish all of the above programmatically, you would first create your text update function, save it to a file (like 'updateFcn.m'), then turn on Data Cursors using the function datacursormode and set them to use your user-defined text update function. Here's an example:

plot(1:10, rand(1, 10));  % Plot some sample data
dcmObj = datacursormode;  % Turn on data cursors and return the
                          %   data cursor mode object
set(dcmObj, 'UpdateFcn', @updateFcn);  % Set the data cursor mode object update
                                       %   function so it uses updateFcn.m

If you want to make a permanent change - Warning: This is a slight hack to MATLAB - open:

C:\Program Files\Matlab\R2007b\toolbox\matlab\graphics\@graphics\@datacursor\default_getDatatipText.m

or a similar file depending on your version and change DEFAULT_DIGITS.