How to avoid scientific notation in stackedplot?
7 次查看(过去 30 天)
显示 更早的评论
I have a stackedplot with 3 plots. The 2nd plot keeps using scientific notation. How do I AVOID scientific notation in the 2nd stackedplot's Y axis?
2 个评论
the cyclist
2025-5-13
It would be most helpful if you could share your code, or just create a simple mockup that illustrates the problem. Otherwise, we have to guess at a lot of things, and potentially waste our time and yours solving something that is not really your issue.
回答(1 个)
Walter Roberson
2025-5-13
h = stackedplot(....);
oldstate = warning('off','MATLAB:structOnObject');
hstruct = struct(h);
warning(oldstate);
arrayfun(@(H)set(H.YAxis.Exponent, 0), hstruct.Axes, 'uniform', 0);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!