MATLAB: How to change the labels of the bar3 plot

label;MATLAB

I would like to change the numbers appearing on the axes of the bar3 plots. How do can I do this?

Best Answer

It is possible to do this using the 'xticklabel', 'yticklabel' and 'zticklabel' properties of the bar3 plot. The code to do this would look like this.
Y = cool(7);
h = bar3(Y,'detached');
hh = get(h(3),'parent');
set(hh,'yticklabel',[-1 -2 -3 0 1 2 3]);