rotating x-axis labels on an image
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Laszlo Bodnar
el 25 de Feb. de 2016
Comentada: Laszlo Bodnar
el 26 de Feb. de 2016
I have created an image using the following code:
smallmatrix_6partic=[0 1 0 0 0 0 ; 0 0 0 0 0 0 ; 0 1 0 0 0 0 ; 0 1 0 0 0 0; 0 0 0 1 0 0; 0 0 0 0 1 0];
smallmatrix_colheading= {'A','B','C','D','E','F','G'}; % these are going to be the row headings of the matrix
[rows,cols]=size(smallmatrix_6partic);
imagesc(smallmatrix_6partic)
set(gca,'Xtick',1:rows,'XTickLabel',smallmatrix_colheading)
set(gca,'Ytick',1:rows,'YTickLabel',smallmatrix_colheading)
My question is, is there a way to change the alignment and rotate the x-axis labels (A, B, C, etc...), maybe 90 degrees clockwise?
0 comentarios
Respuesta aceptada
Sean de Wolski
el 25 de Feb. de 2016
In R2014b or newer:
>> set(gca,'XTickLabelRotation',90)
2 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!