[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colour fill contour plots



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
3ABA9401.142CA08D@sci.monash.edu.au">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
>
>
>