SETAXES

버전 1.1.0.0 (6.32 KB) 작성자: Mukhtar Ullah
creates handles of nested functions for fixing problems with MATLAB figures.
다운로드 수: 3.7K
업데이트 날짜: 2010/10/19

라이선스 보기

This subsmission was inspired by the blog:
http://blogs.mathworks.com/loren/2007/12/11/making-pretty-graphs/

SETAXES fixes common problems with MATLAB figures.
SETAXES(AX, ...) applies to the axes AX which, when not supplied, defaults to the current axes.
SETAXES('xoffset') [2-D view only] adjusts the axes position in the horizontal direction to make up for any clipped (left or right) part of the axes based on some default settings.

SETAXES('yoffset') [2-D view only] adjusts the axes position in the vertical direction to make up for any clipped (lower or upper) part of the axes based on some default settings.

SETAXES('axesmoveresize', [L B R T]) adds the array [L B -R -T] to the 'OuterPosition' property of the axes.

SETAXES('xtick2text', OFFSET) [2-D view only] replaces the tick labels on the X-Axis by text objects where OFFSET is the factor of the axis height used as the vertical margin from the X-Axis.
When not supplied, OFFSET defaults to 0.03.

SETAXES('xtick2text',..., PROP1, VALUE1, PROP2, VALUE2, ...)
sets the values of the specified properties of the text objects.

HT = SETAXES('xtick2text',...) returns in HT the handles of the text objects.

SETAXES('ytick2text', OFFSET) [2-D view only] replaces the tick labels on the Y-Axis by text objects where OFFSET is the factor of the axis width used as the horizontal margin from the Y-Axis.
When not supplied, OFFSET defaults to 0.02.

SETAXES('ytick2text',..., PROP1, VALUE1, PROP2, VALUE2, ...)
sets the values of the specified properties of the text objects.

HT = SETAXES('ytick2text',...) returns in HT the handles of the text objects.

SETAXES('xlabelcorner') [2-D view only] places the XLABEL in an appropriate corner. The most common corner is the right-bottom when the X-Axis is to the bottom and the ticks are increasing from left to right. The corner changes accordingly for other combinations of axes properties.

SETAXES('xlabelcorner', PROP1, VALUE1, PROP2, VALUE2, ...)
sets the values of the specified properties of the XLabel object.

SETAXES('ylabelcorner') [2-D view only] places the YLABEL in an appropriate corner. The most common corner is the top-left when the Y-Axis is to the left and the ticks are increasing upward. The corner changes accordingly for other combinations of axes properties.

SETAXES('ylabelcorner', PROP1, VALUE1, PROP2, VALUE2, ...)
sets the values of the specified properties of the YLabel object.

SETAXES('axesarrows') [2-D view only] adds arrow annotation objects to X- and Y-Axis. The default 'HeadLength' and 'HeadWidth' are both 5. Line width and Color are inherited from the the corresponfing axis line.

SETAXES('axesarrows','xx') adds arrow annotation objects to X-Axis only.
SETAXES('axesarrows','yy') adds arrow annotation objects to Y-Axis only.

SETAXES('axesarrows',..., PROP1, VALUE1, PROP2, VALUE2, ...)
sets the values of the specified properties of the arrow objects.

HA = SETAXES('axesarrows',...) returns in HA the handles of the arrow objects.

Note that since SETAXES('axesarrows',...) changes the axes position property, any annotation objects should be added after SETAXES('axesarrows',...).

=====================================================

%Detail for each function and a comprehensive EXAMPLE is included in help.
%-----------------------------------------------------------------------

인용 양식

Mukhtar Ullah (2024). SETAXES (https://www.mathworks.com/matlabcentral/fileexchange/18607-setaxes), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
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.1.0.0

A new simplified syntax to avoid function handles. Removed features that did not work properly.

1.0.0.0

Dependency on a missing file removed