MATLAB: Are x-labels and y-labels placed inappropriately when ROTATE3D is used in conjunction with BAR3 in MATLAB 7.0 (R14)

bar3MATLABrotate3dxlabelylabel

I have the following script in MATLAB 7.0 (R14) that generates a 3-D Bar plot with x and y labels marked. The ROTATE3D function in the code allows me to rotate the plot once it is drawn.
y=[1:3]';
z=2+rand(3,3);
bar3(y,z)
title('Test title')
xlabel('xlabel')
ylabel('ylabel')
rotate3d(gca)
However, when the plot is rotated it places the xlabel and ylabel incorrectly.

Best Answer

This bug has been fixed in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
There is a bug in MATLAB 7.0 (R14) in how ROTATE3D handles the positions of the x and y labels when involved with the BAR3 function. This behavior is observed only when ROTATE3D is used with BAR3.
There are no workarounds. However, a manual remedy is to do the following in the figure window after issuing the ROTATE3D command:
1. Right click the mouse and select the 'Rotate Options'
2. Choose 'Plot Box Rotate' option
This will move the x and y labels appropriately.