[Master Index] [Index for /tools/hpmatlab/toolbox/matlab/plotxy]

legend

(/tools/hpmatlab/toolbox/matlab/plotxy/legend.m)


Function Synopsis

hx=legend(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11)

Help text

LEGEND Graph legend.
	LEGEND(string1,string2,string3, ...) puts a legend on the
	current plot using the specified strings as labels.

	LEGEND(linetype1,string1,linetype2,string2, ...) specifies
	the line types/colors for each label.
	Linetypes can be any valid PLOT linetype.

	LEGEND(h,...) puts a legend on the plot with handle h.

	LEGEND(M), where M is a string matrix, and LEGEND(H,M)
	where H is a vector of handles to lines also works.

	LEGEND OFF removes the legend from the current axes.

	LEGEND(...,TOL) sets the tolerance for covering data points.
	If LEGEND finds no location where less than TOL data points are
	covered, LEGEND resizes the plot and places the legend outside. 
	TOL = -1 forces the legend to be placed outside the plot. 
	TOL =  0 places the legend on the plot unless no location can be
	found that will not obscure data points.

	To move the legend, press the left mouse button on the
	legend and drag to the desired location.

	Examples:
	    x = 0:.2:12;
	    plot(x,bessel(1,x),x,bessel(2,x),x,bessel(3,x));
	    legend('First','Second','Third');
	    legend('First','Second','Third',-1)

	To avoid grid or plot lines obscuring the legend, make the legend
	the current axes before printing. For example:

	    h=legend('string')
	    axes(h)
	    print

	When the legend axes are made the current axes, the figure window
	may not be redrawn. To force a redraw, use REFRESH.

	See also REFRESH, PLOT.

Cross-Reference Information

This function calls

Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON