# text2

## PURPOSE

Wrapper for text.m that ensures displayed text fits in figure.

## SYNOPSIS

function varargout = text2( varargin )

## DESCRIPTION

     Wrapper for text.m that ensures displayed text fits in figure.

     When text is called, Matlab displays the text, but does nothing to ensure
     that all of the text fits in the figure.  This function, after calling
     text, shrinks the axes until the text is fully visible.  Note that since
     font doesn't resize as the figure does, just because the text fully fits
     after text2 is called, no guaranties are made after the figure is
     resized.  Hence it is a good idea to resize the figure appropriately
     before calling text2.

     Same input/output options as Matlab's text.m command.

     USAGE
      varargout = text2( varargin )

     INPUTS
      varargin   - input to Matlab's text

     OUTPUTS
      varargout  - output to Matlab's text

     EXAMPLE
      figure(1); clf; text( -1 , 2, 'hello world' )  % will not appear
      figure(2); clf; text2( -1 , 2, 'hello world' ) % will appear

     See also TEXT, IMLABEL

     Piotr's Image&Video Toolbox      Version 2.0
     Copyright 2012 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Simplified BSD License [see external/bsd.txt]