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

Home » Public Forums » archive » Missing fill colours in contour plot
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
Missing fill colours in contour plot [message #82830] Tue, 15 January 2013 12:56
Sir Loin Steak is currently offline  Sir Loin Steak
Messages: 42
Registered: January 2012
Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Distinguishing between point-like and curve-like features
Next Topic: Re: Putting an overbar on text in a plot

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

Current Time: Wed Oct 08 17:07:03 PDT 2025

Total time taken to generate the page: 0.00676 seconds