%% Control Number of Decimals Displayed
% Create a scatter plot of random data. Display the y-axis tick labels with two decimal places. Control the decimal places by passing ytickformat a character vector of a numeric format that uses fixed-point notation for the conversion character and a precision value of 2.

x = rand(30,1);
y = rand(30,1);
scatter(x,y);
ytickformat('%.2f')

% Copyright 2012 The MathWorks, Inc.