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)])
|