XYrotalabel - rotate X-axis and Y-axis labels

버전 1.3.0.0 (5.46 KB) 작성자: David Powers
Very simple reliable script giving simple control over label rotation with higher stability
다운로드 수: 1.8K
업데이트 날짜: 2016/1/12

라이선스 보기

This function was written to allow rotation of both X and Y labels without making tricky guesswork about how to rescale the image, as well as address the general lack of robustness of existing alternatives downloaded.
It works on full figures and subplots, and more control over scaling can be obtained by using subplot in combination with XYrotalabel.

It assumes axes are bottom and left and aligns the rotated text to them, but it can also cope with reversed axes, as for example images.

If run without arguments it will rotate the labels on the current figure or subplot by 45°.

If one angle is given it is used for both X and Y labels, if two angles it will rotate labels on both X and Y axes independently. Tweaking is possible by shifting the rotated tick label by ‰. This is required when you rotate angles outside of [0,90]. Normally such rotation requires an offset comparable to the difference from 0 in [-90,0) or 180 in (90,180].

인용 양식

David Powers (2024). XYrotalabel - rotate X-axis and Y-axis labels (https://www.mathworks.com/matlabcentral/fileexchange/45663-xyrotalabel-rotate-x-axis-and-y-axis-labels), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

acknowledge earlier partial solutions I looked at
Added [Ang X Y] option to specify an [X Y] adjustment of the corresponding axis labels.
minor changes to text, fixing formatting
enhanced documentation on multilabel rotation and offset control

1.2.0.0

cleaned up noisy running by adding a couple of ';'

1.1.0.0

added two different angle capability and improved behaviour for angles other than 45, including 0 and 90.

1.0.0.0