home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 3.ddi / DEMOS.DI$ / IMTEXT.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  603 b   |  21 lines

  1. function H = imtext(x,y,T,justify)
  2. %IMTEXT Place possibly multi-line text as xlabel.
  3. %    IMTEXT(x,y,T) writes T, center justified, with the lower left
  4. %    corner at axis normalized coordinates (x,y).
  5. %    IMTEXT(x,y,T,'center') and FIXTEXT(x,y,T,'right) are also possible.
  6. %    H = IMTEXT(...) returns a vector of handles to the lines of text.
  7.  
  8. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  9.  
  10. if nargin < 4, justify = 'center'; end
  11. ax = gca;
  12. dely = .04;
  13. [m,n] = size(T);
  14. for k = 1:m
  15.    h(k) = text(x,y,T(k,:),'units','norm','horiz',justify);
  16.    y = y + dely;
  17. end
  18. if nargout > 0
  19.    H = h';
  20. end
  21.