setting the yticklabels with $10^{-2}$ appearing at the top

2 次查看(过去 30 天)
I want the y axis to be labelled as
But I actually got
The problem is that the ticklabels are too wide. How can I make it appprear as I desire?

采纳的回答

Lone_wolf
Lone_wolf 2024-6-14
FYI
x = linspace(0,5,100);
y1 = 1e5*x;
y2 = 1e-5*x.*sin(20*x);
figure
yyaxis left
plot(x,y1)
yyaxis right
plot(x,y2)
ax = gca;
ax.YAxis(1,1).Exponent = 5;
ax.YAxis(2,1).Exponent = -5;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

标签

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by