| 1 |
cnh |
1.1 |
function [ax,h]=supertext(varargin) |
| 2 |
|
|
% |
| 3 |
|
|
%SUPERTEXT(X,Y,'string') adds the text in the quotes to location (X,Y) |
| 4 |
|
|
% on the global page axes, where (X,Y) is in the range 0 to 1. |
| 5 |
|
|
% If X and Y are vectors, TEXT writes the text at all locations |
| 6 |
|
|
% given. If 'string' is an array the same number of rows as the |
| 7 |
|
|
% length of X and Y, TEXT marks each point with the corresponding row |
| 8 |
|
|
% of the 'string' array. |
| 9 |
|
|
% |
| 10 |
|
|
%Returns a handle to the title and the handle to an axis. |
| 11 |
|
|
% [ax,h]=supertext(text) |
| 12 |
|
|
% returns handles to both the axis and the title. |
| 13 |
|
|
% ax=supertext(text) |
| 14 |
|
|
% returns a handle to the axis only. |
| 15 |
|
|
% |
| 16 |
|
|
%See TEXT for more help. |
| 17 |
|
|
|
| 18 |
|
|
%ax=axes('Units','Normal','Position',[.075 .075 .85 .85],'Visible','off'); |
| 19 |
|
|
xmg=0.03; |
| 20 |
|
|
ymg=0.03; |
| 21 |
|
|
ax=axes('Units','Normal','Position',[xmg ymg 1-2*xmg 1-2*ymg],'Visible','off'); |
| 22 |
|
|
set(get(ax,'Title'),'Visible','on') |
| 23 |
|
|
text(varargin{:}) |
| 24 |
|
|
if (nargout < 2) |
| 25 |
|
|
return |
| 26 |
|
|
end |
| 27 |
|
|
h=get(ax,'Title'); |