the unit will change from second to microsecond during zoom in
조회 수: 5 (최근 30일)
이전 댓글 표시
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
채택된 답변
Cam Salzberger
2018년 4월 11일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Visual Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!