y axis values - change the display

2 vues (au cours des 30 derniers jours)
michael
michael le 24 Oct 2021
Commenté : Simon Chan le 5 Déc 2021
Hi,
I have values on y axis which ranges from 0 to 160000. The value for 80000 (for example) is displayed as 8 (*10^4)
How can I change so that the values would be displayed as non scientific number (i.e 80,000)

Réponses (1)

Simon Chan
Simon Chan le 24 Oct 2021
Modifié(e) : Simon Chan le 24 Oct 2021
Modify the yticklabel as follows:
% plot something
ax = gca;
yticklabels(arrayfun(@(x) sprintf('%d',x),ax.YTick,'uni',0))
  3 commentaires
michael
michael le 5 Déc 2021
@Simon Chan Can you please assist?
Simon Chan
Simon Chan le 5 Déc 2021
Sorry, I don't have such Matlab version and hence unable to give you an answer.

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by