exponential notation used for uislider Major Tick Mark Labels
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Sulaymon Eshkabilov
le 1 Oct 2022
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]);
Voir également
Catégories
En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!