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

Home » Public Forums » archive » shading in 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: shading in contour plots [message #44740 is a reply to message #44648] Mon, 11 July 2005 01:36 Go to previous messageGo to previous message
c.hoyle is currently offline  c.hoyle
Messages: 3
Registered: July 2005
Junior Member
> P.S. If you are still struggling, tell us something about
> the size of the array you are contouring and let us see
> the contour code you are using.

I think this better describes my problem. Consider the following:

;test the shading in contour plots:
JM=46
KM=25

inbetween=1 ;choose 1 for 3 levels or anything else for 2 levels.


sf=fltarr(JM,KM)
sf(20:21,10:15)=1.

sf(10:11,10:11)=1.

sf(5,10)=1.
sf(5,11)=1.
sf(5,12)=1.

;sf(*,*)=1
xr=[-90,90]
yr=[0,24]
IF inbetween EQ 1 THEN lev=[0.,0.5,1.] ELSE lev=[0.,1.]
IF inbetween EQ 1 THEN col=[0,100,182] ELSE col=[0,182]
lat_arr=findgen(JM)*4-90
alt=findgen(KM)
Contour,sf,lat_arr,alt,levels=lev,ystyle=1,xstyle=1,xrange=x r,$
yrange=yr,xtitle='Latitude',ytitle='Altitude
(km)',c_thick=3,charthick=3,charsize=1.2,$
/cell_fill,c_colors=col

oplot,[-10,-10],[0,25]

END

If you only use levels 0 and 1, the line on the far left does not show
up. If you use levels in between 1 and 0, the boundaries of the other
rectangles are no longer properly defined. This is not such a problem
with rectangles, but if the shapes are more complicated, then the
result is not
good. I dont think that this is a problem with nlevels (I dont use it)
or /fill (I use /cell_fill).
cheers,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: validating user input
Next Topic: Re: BAR_PLOT restricted to 60 element ARRAY??

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

Current Time: Tue Dec 02 03:50:57 PST 2025

Total time taken to generate the page: 0.96483 seconds