suplabel

버전 1.5.0.0 (2.53 KB) 작성자: Ben Barrowes
Places text as a title, xlabel, or ylabel on a group of subplots.
다운로드 수: 40.3K
업데이트 날짜: 2018/8/8

라이선스 보기

편집자 메모: This file was a File Exchange Pick of the Week

PLaces text as a title, xlabel, or ylabel on a group of subplots. Returns a handle to the label and a handle to the axis.

[ax,h]=suplabel(text,whichLabel,supAxes)

returns handles to both the axis and the label.

ax=suplabel(text,whichLabel,supAxes)

returns a handle to the axis only. suplabel(text) with one input argument assumes whichLabel='x'

whichLabel is any of 'x', 'y', or 't', specifying whether the text is to be the xlable, ylabel, or title respectively.

supAxes is an optional argument specifying the Position of the "super" axes surrounding the subplots. supAxes defaults to [.075 .075 .85 .85] specify supAxes if labels get chopped or overlay subplots

EXAMPLE:
subplot(2,2,1);ylabel('ylabel1');title('title1')
subplot(2,2,2);ylabel('ylabel2');title('title2')
subplot(2,2,3);ylabel('ylabel3');xlabel('xlabel3')
subplot(2,2,4);ylabel('ylabel4');xlabel('xlabel4')
[ax,h1]=suplabel('super X label');
[ax,h2]=suplabel('super Y label','y');
[ax,h3]=suplabel('super Title' ,'t');
set(h3,'FontSize',30)

SEE ALSO: text, title, xlabel, ylabel, zlabel, subplot,
suptitle (Matlab Central)

인용 양식

Ben Barrowes (2024). suplabel (https://www.mathworks.com/matlabcentral/fileexchange/7772-suplabel), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

Now allows text to be a cell array of strings to allow for multiline labels.

1.3.0.0

Restores visible axes at exit. Now zoomable, etc. at exit.

1.2.0.0

Modified to restore visible axes on exit. Now zoomable, etc. on exit.

1.1.0.0

added capability for right side y-label

1.0.0.0

Default behavior now detects existing axes.