textLoc

버전 1.0.0.0 (2.55 KB) 작성자: Ben Barrowes
Puts string onto the current axes with location similar to legend locations.
다운로드 수: 9.4K
업데이트 날짜: 2007/10/25

라이선스 보기

% function [H]=textLoc('string',location[,parameter,value,...])
%
% Puts string onto the current axes with location similar to legend locations.
% Passes all parameter, value pairs to text. textLoc works with semilog and
% loglog plots.
%
% H is the handle from the text command after modifications by textLoc.
%
% location can also be a 1x2 cell array containing {location,buffer} where
% buffer is a spacing buffer (in normalized units) for distance from the axes.
% buffer default is 1/50
%
% location can be any of:
% 'North' inside plot box near top
% 'South' inside bottom
% 'East' inside right
% 'West' inside left
% 'Center' centered on plot
% 'NorthEast' inside top right (default)
% 'NorthWest' inside top left
% 'SouthEast' inside bottom right
% 'SouthWest' inside bottom left
% 'NorthOutside' outside plot box near top
% 'SouthOutside' outside bottom
% 'EastOutside' outside right
% 'WestOutside' outside left
% 'NorthEastOutside' outside top right
% 'NorthWestOutside' outside top left
% 'SouthEastOutside' outside bottom right
% 'SouthWestOutside' outside bottom left
% 'NorthEastOutsideAbove' outside top right (above)
% 'NorthWestOutsideAbove' outside top left (above)
% 'SouthEastOutsideBelow' outside bottom right (below)
% 'SouthWestOutsideBelow' outside bottom left (below)
% 'Random' Random placement inside axes
% or
% 1 = Upper right-hand corner (default)
% 2 = Upper left-hand corner
% 3 = Lower left-hand corner
% 4 = Lower right-hand corner
% -1 = To the right of the plot
%
% EXAMPLES:
% figure(1); x=0:.1:10; y=sin(x); plot(x,y);
% t=textLoc('North','North')
% t=textLoc('southeastoutside',{'southeastoutside',1/20},'rotation',90)
% t=textLoc('SouthEast',4)
% t=textLoc('West',{'west',.1})
% t=textLoc('northwest',{2,.3},'Color','red')
% t=textLoc({'\downarrow','south'},'south')
% t=textLoc('SWRot',{3},'rotation',45)
% t=textLoc('NEOAbove',{'NorthEastOutsideAbove',0},'FontSize',8)
% t=textLoc('textLoc','center','edgecolor','black','fontsize',20)

인용 양식

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

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Maintain or Transition figure-Based Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

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

better examples, more choices