the unit will change from second to microsecond during zoom in
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
bigseat
il 11 Apr 2018
Risposto: Cam Salzberger
il 11 Apr 2018
In the Matlab plot, I want the unit to adapt when I zoom in or zoom out. For example, for a 1-second record, when I zoom in to microsecond scale, I would like the number at x-axis to be something like 2.5 µs rather than 25*1e-7. Of course I want to xlabel to be changed from 'second ' to 'microsecond'as wekk.
Thanks!
0 Commenti
Risposta accettata
Cam Salzberger
il 11 Apr 2018
Hello,
By default, MATLAB sticks to a consistent "unit" that matches with the data provided, since there is no other real way for MATLAB to know what units you are trying to use. Probably the easiest way to manage what you are looking for is to make a custom callback for a zoom action, and have that manage the tick locations, labels, and x-axis labeling. The ActionPostCallback is probably the one to use, since you can simply get the current limits of the axis to calculate desired tick labels.
-Cam
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Visual Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!