color legend

Name

	color legend

Summary

	Name	color legend
	Type	mapper
	Inputs	colormap
	Output	geometry
	Parameters
	Name			Type		Default	Min	Max
	Boundary On/Off		boolean		on
	Boundary Gray Level	integer		255	0	255
	Labels On/Off		boolean		on
	Label Density		integer		2	2	12
	Label Height		real		0.09	0.001	0.2
	Label Gray Level	integer		255 	0	255
	Label Font		integer		0	0	21
	Label Boundaries On/Off	boolean		
	
	Reverse Colors		boolean		off
	Legend Orientation	radio		vertical vertical,horizontal

Description

	This module takes an input colormap and generates a
	"color legend," consisting of a number of geometry
	objects which may be subsequently rendered using the
	render geometry module.
	The range of colors in the color scale is controlled
	by the input colormap.  All colors in the colormap are
	represented in the output color scale.  
	In addition to the smoothly shaded "color bar", the user
	may control various parameters relating to labeling
	characteristics, and legend orientation.

Inputs


	AVS Colormap (required)

Parameters

	Boundary On/Off
	This boolean flag indicates whether or "color bar" part of the
	color legend it to have, on its perimeter, a pixel-thick
	line "boundary."  The boundary is useful, especially if 
	many colors in the "color bar" are similar to the current
	background color.
	Boundary Gray Level
	This value is used to set the gray level of the boundary. 
	A value of 0 corresponds to a black boundary, while a value
	of 255 corresponds to a white boundary.
	Labels On/Off
	This boolean value is used to enable/disable the annotation
	which accompanies the color legend which indicate the values
	associated with the colors.
	Label Density
	The number of labels produced is controlled through this
	parameter.  The minimum is two (the top and bottom of the
	color bar), and the maximum is twelve.  The max of 12 was
	an arbitrary decision based upon the "busyness" of color
	legends with too many labels.  Feel free to change this.
	Label Height
	This slider controls the size of the font.  The number associated
	with this slider is in some arcane coordinate system.
	Label Gray Level
	Controls the gray level of the labels text (and the labels
	boundary, as well).  A value of 0 will produce black text,
	a value of 255 will produce white text.
	Label Font
	Selects from one of 22 fonts.  Whether or not all of these
	fonts actually exist on your system is open for debate.  The
	number of available fonts comes from the Stardent documentation.
	Label Boundaries On/Off	
	Controls whether or not a "boundary line" appears in the color
	bar at the location corresponding to a particular label.  So,
	for example, if only two labels are specified, the two boundaries
	will be draw at the top/bottom of the colormap.  No boundaries
	will be visible (unless the gray level is different than that
	for the "regular" boundary) unless the label density parameter is
	set to three or higher.
	
	Reverse Colors
	This flag will reverse the colors, and any associated labels.
	Legend Orientation
	The user can choose between a vertical or horizontal color legend
	orientation.

Outputs

	AVS geometry.

Example

	 generate colormap
		|
	   color scale
		|
	 render geometry
		|
	 display pixmap
	

Limitations

	It is possible to produce a really messy color legend by
	fiddling with the parameters enough.
	There is no "title" parameter.  This has been specifically
	omitted as it would be impossible to appease all users
	as to its location with respect to the color legend.
	The positioning of the labels with respect to the color
	legend is fixed:  on vertical legends, the characters 
	appear to the right, and on horizontal legends, they
	appear below the legend (compare with the NCAR utility
	for producing legends). 

Author

	Wes Bethel, Lawrence Berkeley Laboratory
AVS Modules							color legend
Lawrence Berkeley Laboratory					27 June 1991