I cannot figure out how to rotate my xtick labels in a 3d graph. Someone previously suggested:
set(get(gca,'xlabel'), 'Rotation',90)
But when I do this, nothing changes.
The whole code is:
width = 0.7
zheight = 500
set(0,'DefaultAxesLineStyleOrder',{'-*',':','o'})
d=bar3(a,x,width)
set(gcf,'color','w');
zlim([0 zheight])
set(gca,'FontSize',14 ,'FontWeight','bold')
set(gca, 'YTick',1:8, 'YTickLabel',{'1','2','4','8','12','16','20','24'})
set(gca, 'XTick',1:7, 'XTickLabel',{'a' 'b' c' 'd' 'e','f','g'})
set(get(gca,'xlabel'),'rotation',90)
xticklabel_rotate([1:5],45,{'label_1','label_2','label_3','label_4','label_5'},'interpreter','none')
. The first parameter I'm assuming are the locations of each tick. In this case, each tick goes from 1 up to 5. You'll need to change this to accommodate where exactly your ticks are located on the x-axis. The second argument is the angle you want to rotate each label and the third element is a cell array of labels where each cell element is the label you want for each tick. – Drowse