# how to force matlab to display enough numbers on the plot X and Y?

The problem is that matlab "cuts" some numbers and I do not recognize actual value. Look at the screenshot, on Y there are a lot of "0.0156" while I expect "0.01562" "0.01564" "0.01566" etc.

How to say matlab to display enough numbers so I can recognize actual value?

-
Ther is an active group of Matlab programmers at StackOverflow. Have a look at the Matlab tags and consider posting there. – ephsmith Jul 21 '12 at 15:09
@ephsmith thanks, next question will go to StackOverflow :) – javapowered Jul 21 '12 at 16:55

The ability to specify the precision of the tick labels on an axis is not available in MATLAB 7.3 (R2006b).

To work around this issue, you can retrieve the ticks, convert them to strings with a specified precision, and set the labels to the new tick labels. The following example code can be executed at the MATLAB command prompt, to illustrate this work around:

``````% Create an example plot.
plot(1:10);

% Query xTick numerical values.
xTick = get(gca,'xTick');

% Create strings out of xTick numerical values with a prescribed precision.
% The format string '%a.bf' means to present the values within a field that
% is wide enough to fit 'a' digits with 'b' digits after the decimal point
% in the format of a 'f'loating point number.
xTickLabel = arrayfun( @(x) sprintf('%3.2f',x), xTick, 'uniformoutput', false);

% Use xTickLabel on the plot.
set(gca, 'xTickLabel', xTickLabel);
``````

Note that once the tick labels have been set, they are in manual mode. The tick labels will not update automatically with the resizing of the figure window or zooming in and out of the window.

-

This may not be the nicest solution but it should allow you to distinguish the values:

Multiply all values by 1000, then just add a label or title that makes clear that the values are multiplied by 1000.

-