exponential notation used for uislider Major Tick Mark Labels
3 次查看(过去 30 天)
显示 更早的评论
When using the uislider component where the limits are particularly large, as in the following code snippet
fig = uifigure;
sld = uislider(fig);
sld.Limits = [1 20000];
the major tick mark labels use exponential notation.
Is there a way of turning off this exponential notation? Since the major tick marks change when resizing the figure, it would be nice to avoid modifying the major tick mark labels in the code.
0 个评论
回答(1 个)
Sulaymon Eshkabilov
2022-10-1
How about this way of scaling:
How about defining ticks and tick labels, e.g.:
fig = uifigure;
S = uislider(fig);
S.Limits = [0, 20000];
S.MajorTicks = [0, 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000];
S.MajorTickLabels = string([0, 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000]);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!