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

Home » Public Forums » archive » Re: Missing fill colours in contour plot
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: Missing fill colours in contour plot [message #82827 is a reply to message #82826] Tue, 15 January 2013 14:07 Go to previous messageGo to previous message
tortoisesaregreat is currently offline  tortoisesaregreat
Messages: 2
Registered: January 2013
Junior Member
On Tuesday, 15 January 2013 20:56:23 UTC, lj...@fsmail.net wrote:
> I am trying to do a contour plot of a latitude-longitude array, but I keep getting gaps in my plot, as shown in the following image: http://www.physics.open.ac.uk/~lsteele/contour.png. I'm stumped as to the reason, as it's not as if it's missing contours at the very end ranges of the contour values - it's somewhere in between. Anyhow, I'm sure the knowledgable folks on here will know!
>
>
>
> I have defined a blue-white-red colour scheme and loaded it in with tvlct, but the problem occurs with other colour schemes too. I am calculating my contour levels and colours as follows (with ncont the number of contours I'm plotting):
>
>
>
> minv = floor(min(array))
>
> maxv = ceil(max(array))
>
> maxval = max([abs(array),abs(array)])
>
> clevels = -maxval + findgen(ncont)/(ncont-1)*2*maxval
>
> ccol = floor(findgen(ncont)/(ncont-1)*250)
>
>
>
> I am then plotting my contour plot as:
>
>
>
> device, decomposed=0
>
> bwr_colour, red_vec, grn_vec, blu_vec
>
> tvlct, red_vec, grn_vec, blu_vec
>
> contour, array, lon, lat, $
>
> levels=clevels, c_colors=ccol, /fill, $
>
> background=cgColor('white'), color=cgColor('black'), $
>
> xrange=[-180,180], yrange=[-90,90], xstyle=1, ystyle=1, $
>
> yticks=6, ytickv=[-90,-60,-30,0,30,60,90], $
>
> xticks=6, xtickv=[-180,-120,-60,0,60,120,180], $
>
> xtitle='Longitude', ytitle='Latitude', charsize=1.5, $
>
> title=plotsym+' (all motions) / g m!u-1!n s!u-1!n'
>
>
>
> If anyone can offer any suggestions then I'll be very grateful, as it's bugging me now!
>
>
>
> Cheers,
>
>
>
> Liam

Sorry - I made a mistake when typing the code to the newsgroup. The maxval statement actually reads:

maxval = max([abs(minv),abs(maxv)])
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CgWindow and multiple plots
Next Topic: Matrices

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

Current Time: Mon Oct 13 02:13:50 PDT 2025

Total time taken to generate the page: 0.79860 seconds