y axis values - change the display

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)

Antworten (1)

Simon Chan
Simon Chan am 24 Okt. 2021
Bearbeitet: Simon Chan am 24 Okt. 2021

0 Stimmen

Modify the yticklabel as follows:
% plot something
ax = gca;
yticklabels(arrayfun(@(x) sprintf('%d',x),ax.YTick,'uni',0))

3 Kommentare

michael
michael am 24 Okt. 2021
I have old Matlab version - R14SP3.
Do you have any solution for that one?
michael
michael am 5 Dez. 2021
@Simon Chan Can you please assist?
Simon Chan
Simon Chan am 5 Dez. 2021
Sorry, I don't have such Matlab version and hence unable to give you an answer.

Melden Sie sich an, um zu kommentieren.

Tags

Gefragt:

am 24 Okt. 2021

Kommentiert:

am 5 Dez. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by