Re: [Q] Controlling the number of contour labels [message #7092] |
Wed, 18 September 1996 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Iarla Kilbane-Dawe <iarla@atm.ch.cam.ac.uk> wrote:
> does anyone know of a way to control the number of labels on a
> contour using the CONTOUR procedure. IDL used to produce a reasonable
> number (one or two per contour line) but recently, presumably because of
> changes in my data, the number of labels per contour line has risen to
> about ten. Does anyone know how to keep the number down?
>
I don't believe there is a way to control the number of labels on an
individual contour line. This depends on the length of the contour
line, etc.
But if you have too many labels on your contour plot, you can do
something about that. By default every other contour line is
labeled when the FOLLOW keyword is set. If you would like
to label every third contour line, for example, you can use
the C_LABELS keyword like this:
Contour, data, /Follow, C_LABELS=[1, 0, 0]
The C_LABELS vector tells IDL whether a contour line should
be labeled (value=1) or not (value=0). The vector wraps for
more than 3 contour lines. So if you set NLEVELS=12, the
1st, 4th, 7th, and 10th contour line will be labeled.
David
--
David Fanning, Ph.D.
Phone: 970-221-0438
Fax: 970-221-4728
E-Mail: davidf@fortnet.org
|
|
|