comparison scripts/plot/legend.m @ 10666:7a43499f074a

legend.m: Improve documentation string
author Rik <octave@nomad.inbox5.com>
date Wed, 26 May 2010 20:23:16 -0700
parents 3afcd24ced61
children 693e22af08ae
comparison
equal deleted inserted replaced
10665:0f310fce905d 10666:7a43499f074a
16 ## You should have received a copy of the GNU General Public License 16 ## You should have received a copy of the GNU General Public License
17 ## along with Octave; see the file COPYING. If not, see 17 ## along with Octave; see the file COPYING. If not, see
18 ## <http://www.gnu.org/licenses/>. 18 ## <http://www.gnu.org/licenses/>.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} legend (@var{st1}, @var{st2}, @dots{}) 21 ## @deftypefn {Function File} {} legend (@var{str1}, @var{str2}, @dots{})
22 ## @deftypefnx {Function File} {} legend (@var{st1}, @var{st2}, @dots{}, "location", @var{pos})
23 ## @deftypefnx {Function File} {} legend (@var{matstr}) 22 ## @deftypefnx {Function File} {} legend (@var{matstr})
24 ## @deftypefnx {Function File} {} legend (@var{matstr}, "location", @var{pos})
25 ## @deftypefnx {Function File} {} legend (@var{cell}) 23 ## @deftypefnx {Function File} {} legend (@var{cell})
26 ## @deftypefnx {Function File} {} legend (@var{cell}, "location", @var{pos}) 24 ## @deftypefnx {Function File} {} legend (@dots{}, "location", @var{pos})
27 ## @deftypefnx {Function File} {} legend (@var{hax}, @dots{}) 25 ## @deftypefnx {Function File} {} legend (@var{hax}, @dots{})
28 ## @deftypefnx {Function File} {} legend (@var{hobjs}, @dots{}) 26 ## @deftypefnx {Function File} {} legend (@var{hobjs}, @dots{})
29 ## @deftypefnx {Function File} {} legend (@var{hax}, @var{hobjs}, @dots{}) 27 ## @deftypefnx {Function File} {} legend (@var{hax}, @var{hobjs}, @dots{})
30 ## @deftypefnx {Function File} {} legend ('@var{func}') 28 ## @deftypefnx {Function File} {} legend ("@var{option}")
31 ## 29 ##
32 ## Display a legend for the axes with handle @var{hax}, or the current axes, 30 ## Display a legend for the axes with handle @var{hax}, or the current axes,
33 ## using the specified strings as labels. Legend entries may be specified 31 ## using the specified strings as labels. Legend entries may be specified
34 ## as individual character string arguments, a character array, or a cell 32 ## as individual character string arguments, a character array, or a cell
35 ## array of character strings. If the handles, @var{hobjs}, are not specified 33 ## array of character strings. If the handles, @var{hobjs}, are not specified
36 ## the legend's strings will be associated with the axes' descendents. 34 ## then the legend's strings will be associated with the axes' descendants.
37 ## Legend works on line graphs, bar graphs, etc. 35 ## Legend works on line graphs, bar graphs, etc.
38 ## A plot must exist before legend is called. 36 ## A plot must exist before legend is called.
39 ## 37 ##
40 ## The optional parameter @var{pos} specifies the location of the legend 38 ## The optional parameter @var{pos} specifies the location of the legend
41 ## as follows: 39 ## as follows:
60 ## @item 58 ## @item
61 ## @item @tab outside @tab 59 ## @item @tab outside @tab
62 ## can be appended to any location string 60 ## can be appended to any location string
63 ## @end multitable 61 ## @end multitable
64 ## 62 ##
65 ## Some specific functions are directly available using @var{func}: 63 ## The following customizations are available using @var{option}:
66 ## 64 ##
67 ## @table @asis 65 ## @table @asis
68 ## @item "show" 66 ## @item "show"
69 ## Show legends from the plot 67 ## Show legend on the plot
70 ## @item "hide" 68 ## @item "hide"
71 ## @itemx "off" 69 ## @itemx "off"
72 ## Hide legends from the plot 70 ## Hide legend on the plot
73 ## @item "boxon" 71 ## @item "boxon"
74 ## Draw a box around legends 72 ## Show a box around legend
75 ## @item "boxoff" 73 ## @item "boxoff"
76 ## Withdraw the box around legends 74 ## Hide the box around legend
77 ## @item "left" 75 ## @item "left"
78 ## Text is to the left of the keys 76 ## Place text to the left of the keys
79 ## @item "right" 77 ## @item "right"
80 ## Text is to the right of the keys 78 ## Place text to the right of the keys
81 ## @end table 79 ## @end table
82 ## @end deftypefn 80 ## @end deftypefn
83 81
84 function legend (varargin) 82 function legend (varargin)
85 83