MATLAB: Y axis in scientific form

axisplotplotting

Hello,
I want to plot Y axis in the scientific form and not in engineering form (es 1E4 and not 10^4), si it possible?

Best Answer

How does this work for you?
ax = axes;
plot(ax, 1:10, (1:10).^10)
% get rid of 'x 10^N' in corner
ax.YAxis.Exponent = 0;
% get rid of 'x 10^N' formatting in individual labels
ytickformat(ax, '%f')
% get the labels
yticklabels = ax.YTickLabel;
% for each one, reformat to 'E+N' notation using sprintf
for ii = 1:numel(yticklabels)
yticklabels{ii} = sprintf('%.0E', str2double(yticklabels{ii}));
end
% reassign the labels
ax.YTickLabel = yticklabels;