Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Libraries / Daithi / CONTOUR_LEGEND

CONTOUR_LEGEND

CONTOUR_LEGEND

Name


CONTOUR_LEGEND

Purpose


This procedure plots a legend for colour-contour plots.

Category


Graphics

Calling Sequence


CONTOUR_LEGEND, Xpos, Ypos

Inputs


Xpos: The x-coordinates of the legend box, of integer or
floating point type, in the form of a 2-element vector.
The vector is of the form [ leftmost, rightmost ].
Ypos: The y-coordinates of the legend box, of integer or
floating point type, in the form of a 2-element vector.
The vector is of the form [ bottom, top ].

Keyword Parameters


ARROWEND: If set, then pointed end levels are plotted, indicating
that the end levels extend beyond the range of the plot. The
default is rectangular end levels, like all the other levels.
A 2 element vector can also be input, where the first element
gives the setting (0 or 1) for the left/bottom end and the
second for the right/top end.
C_COLORS: A vector of the contour level colour indices, of type
integer. This vector should be of size NLEVELS-1.
CHARSIZE: The size of the text characters.
COLOR: The colour index of the text and border, of type integer.
FONT: The standard IDL font keyword.
HORIZONTAL: If set, the procedure plots a horizontal legend. This is
the default.
LEVELS: A vector of contour level values, of type integer or floating
point.
[MIN,MAX]LEVEL: The [minimum, maximum] level value, of type integer
or floating point. If used, both values must be set. If
LEVELS is set it overrides these values.
NLEVELS: The number of contour level values, of type integer. If
LEVELS is set, its size overrides NLEVELS. If set to a
negative value, then the routine picks a comfortable number of
levels with -NLEVELS being a maximum. The default is to pick
a comfortable limit according to choose_levels.pro.
NORMAL: If set the procedure uses normalised coordinates. The
default is data coordinates.
NTICKS: Number of tick marks, of type integer. If TICKNAME is set,
its size overrides NTICKS.
SUBTITLE: Subtitle of the legend, giving the data units, of type
string.
THICK: The line thickness.
TICK_DECPLACE: Number of decimal places to print in the tick labels,
of type integer. This is used only if TICKNAME is not defined.
TICKLEN: The length of the tick marks in terms of fraction of the
legend box size, of type floating point.
TICKNAME: A string vector containing the labels for each tick mark.
TICKV: An integer or floating vector containing the positions of the
tick marks.
TITLE: The title of the legend, of type string. If set to a
non-string type (i.e. "/TITLE") then "Legend" is used.
VERTICAL: If set, the procedure plots a vertical legend. The default
is horizontal.

Uses


choose_levels.pro
decimal_place.pro
      str.pro
var_type.pro

Procedure


This procedure draws a box and fills it with colour-contoured
levels. It then adds ticks and labels to the box.

Example


Plot a horizontal 30-level colour-contoured legend at the bottom
of the display.
contour_legend, [0.2,0.8], [0.1,0.2], nlevels=30, title=1, $
horizontal=1, normal=1

Modification History


  Written by: Daithi A. Stone, 2000-07-11.
Modified: DAS, 2000-07-12 (corrected HORIZONTAL and
VERTICAL keywords, added MINLEVEL and MAXLEVEL
keywords).
Modified: DAS, 2000-07-19 (added tick-choosing algorithm).
Modified: DAS, 2000-09-21 (cleaning, debugging,
documentation).
Modified: DAS, 2000-09-25 (modified tick-choosing).
Modified: DAS, 2000-11-28 (modified tick-choosing).
Modified: DAS, 2002-11-22 (added FONT keyword).
Modified: DAS, 2007-02-06 (added ARROWEND option; changed
plotting method)
Modified: DAS, 2007-09-18 (allowed a flexible number of levels
to be chosen; some standardisation of code)
Modified: DAS, 2009-05-04 (added the THICK keyword; added noclip
property to borders and ticks; fixed bug with TICKNAME
implementation when ARROWEND is set)
Modified: DAS, 2009-10-27 (added TICKV keyword)



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us