Dear all,
I have a 3D plot like this:
In the Y-axis of the plot, each group of three bars refer to the same parameters: x1, x2, x3. I would like to have a spacing in the y-axis for each group of three bars, so that it becomes more clear that those bars are referring to the same parameters. At the same time, I would like to put a label on the Y-axis to each of group of three bars. For example, if we're on the y-axis the following layout would be desired:
x1 x2 x3 x1 x2 x3 x1 x2 x3
grid1 grid2 grid3
Any suggestions are more than welcomed! The code that I used to plot the bars, is given below:
Z = rand(9,5);
h = bar3(Z);
[r c] = size(Z);
zdata = [];
for i = 1:c
zdata = [];
for j = 1:r
zdata = [zdata; ones(6,4)*Z(j,i)];
end
set(h(i),'Cdata',zdata)
end
colormap
colorbar
set(gca,'YTickLabel',['x1';'x2';'x3';'x1';'x2';'x3';'x1';'x2';'x3']);
view([-64 44]);