comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Filled contours + labels of different color
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Filled contours + labels of different color [message #63993] Tue, 25 November 2008 08:59 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MichaelT writes:

> So how can I plot labels of a certain color + filled contours? If
> there is a two step process, I do not mind: Eg. first plot the filled
> contours without labels and then the labels with a different color
> (white) - but without additional contours! I was unable to come up
> with a solution... Is it too obvious for me to see?

Typically, you draw the filled contours, and then overplot
the contour lines:

data = dist(200)
loadct, 5, ncolors=12, bottom=1
device, decomposed=0, get_decomposed=theState
contour, data, nlevels=12, /fill, c_colors = indgen(12) + 1
contour, data, nlevels=12, /overplot, c_label=replicate(1,12)
device, decomposed=thestate

Of course, colors are wrong, etc. All the usual caveats. :-)

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Filled contours + labels of different color [message #63994 is a reply to message #63993] Tue, 25 November 2008 07:57 Go to previous messageGo to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
MichaelT wrote:
> Dear all,
>
> today I tried to do something very simple (I am using IDL 7.0): I have
> filled contours of different colors (c_colors=...). I also added
> labels. Those labels, however, are now also in the colors of the
> filled contours - so you cant see them. Changing "color=" did not
> help.
>
> So how can I plot labels of a certain color + filled contours? If
> there is a two step process, I do not mind: Eg. first plot the filled
> contours without labels and then the labels with a different color
> (white) - but without additional contours! I was unable to come up
> with a solution... Is it too obvious for me to see?

hi,
what about doing the opposite? ... first contour + label in white, then
overlay the contour in color (no label)? Use the same settings in both
call to contour, except for the color obviously!

Jean

>
> Thanks,
> Michael
Re: Filled contours + labels of different color [message #64109 is a reply to message #63993] Wed, 26 November 2008 10:11 Go to previous message
MichaelT is currently offline  MichaelT
Messages: 52
Registered: May 2006
Member
Hi David!

> Typically, you draw the filled contours, and then overplot
> the contour lines:
Yes that is what I did. Only I do not want the additional white lines
of the second contour plot, just the white labels. Is that possible in
any way?

Background is that I want to overlay contour lines of another data set
on the filled contours. So if you have the lines from the first data
set + those of the second, the plot gets pretty crowded.

Thanks, Michael
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: google earth projections
Next Topic: Filled contours + labels of different color

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:42:06 PDT 2025

Total time taken to generate the page: 0.00572 seconds