Axis Labels
이전 댓글 표시
I am using autoranges on my plots. The axis are shown in scientific notation with the multiplier shown once at the end of the axis (and to the side). Is there a way to continue using autoranges, but have the multiplier (ex x10^-3 or e-3) next to every tick label?
답변 (1개)
Walter Roberson
2011년 7월 25일
0 개 추천
Only by text()'ing the multiplier in to place, and being sure to have that logic hooked in to zoommode() so that the multiplier gets updated as you zoom or pan around.
There is an alternate approach, which is to set the [XY]TickLabel directly, to a tex string that includes the exponent in it. Having even a single [XY]TextLable turns off [XY]TextLabelMode, and with that mode turned off, it will never include the automatic exponent, leaving you to text() in the entire label yourself. Though again if you do this then you have to handle all the label updates in zoommode(), but at least you are saved from try to get nice pixel alighment in the add-on string representing the exponent.
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!