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

Home » Public Forums » archive » Re: Colour fill contour plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Colour fill contour plots [message #24305] Thu, 22 March 2001 21:06
Paul Krummel is currently offline  Paul Krummel
Messages: 12
Registered: August 1998
Junior Member
Hi Morwenna,
How are you?

I mucked around with this for a little bit and came up with this:

a=dist(100)
contour,a,levels=findgen(10)*10
contour,a,levels=[30,40],c_col=[250,0],/cell_fill,/over,min_ value=29,max_val
ue=41

Note the use of /cell_fill instead of /fill. I also had to use min and max
values of
29 and 41 -> try using min and max of 29.9 and 40.1! This causes stepping in
the filling (due to data outside of the range 29.9 and 40.1 being treated as
missing).

Anyway, the above will "blank" out a small part of the y-axis (look near the
40 and 60 tick marcks).
This is due to the colour '0' being used to fill between data values of 40
and 41.
So to get around this I did the following which is a bit kludgey:

a=dist(100)
contour,a,levels=findgen(10)*10,/nodata
contour,a,levels=[30,40],c_col=[250,0],/cell_fill,/over,min_ value=29,max_val
ue=41
contour,a,levels=findgen(10)*10,/noerase

Hope this helps. Has anyone got a better solution, I would certainly be
interested
to know of another way to do this.

Catch up with you sometime Morwenna.
Cheers, Paul


"Morwenna Griffiths" <morwenna.griffiths@sci.monash.edu.au> wrote in message
news:3ABA9401.142CA08D@sci.monash.edu.au...
> I am wanting to do two colour fills on a single plot, but can't seem to
> get a "transparent" colour.
>
> I can colour in between just the values I want with something like
> contour,b,levels=findgen(20)*10
> contour,a,levels=[70,80],c_col=[250,0],/fill,/over
> but then this blacks (background colour) in all values of a over 80.
>
> I have tried
> contour,a,levels=[70,80],c_col=[250],/fill,/over
> but this fills all values over 70 with my required colour.
>
> What I want to do is to fill between 70 and 80 with a particular colour
> but leave the rest of the plot
> unchanged.
>
> Any ideas?
>
> Morwenna
>
> --
> Morwenna Griffiths
> Department of Mathematics and Statistics,
> P.O. Box 28M,
> Monash University,
> Vic. 3800,
> Australia
>
> Email: morwenna.griffiths@sci.monash.edu.au
> Web page: http://www.maths.monash.edu.au/~morwenna
>
> Phone: (03) 9905 4411
>
> donate free food at http://www.thehungersite.com
>
>
>
[Message index]
 
Read Message
Previous Topic: Re: Minor problem with command line editing on SGIs
Next Topic: V5.4 SIZE() for undefined variable

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

Current Time: Wed Oct 08 13:10:42 PDT 2025

Total time taken to generate the page: 0.00397 seconds