How to change the x axis label
Mostrar comentarios más antiguos
Hello!
I am plotting a matrix output using imagesc and my x-axis is labeled from 1-151 however I would like the x-axis labels to be between 4.5:.01:6 but still display the full contents of the image. How would I do the relabeling? Thank you in advance.
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 31 de Mayo de 2013
xt=get(gca,'xtick')
new_xt=num2cell(linspace(4,6,numel(xt)))
set(gca,'xticklabel',new_xt)
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!