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

x = rand(50,1);
y = rand(50,1);
z = rand(50,1);
scatter3(x,y,z)
ztickformat('%.2f')

% Copyright 2012 The MathWorks, Inc.