On Apr 22, 9:07 am, David Fanning <n...@dfanning.com> wrote:
> Jon writes:
>> In contouring certain variables (e.g.' temperature) across North
>> America, IDL is doing something very interesting. Along the US/Canada
>> border it seems to encounter an error that causes it to draw contour
>> lines where they should not be (e.g., between two values that I have
>> specified to be within the same contour level interval. For example, I
>> specify 0, 0.1, 0.2, etc... and it draws a line between locations with
>> values of 0.13 and 0.14.
>
>> MAP_SET is called, but otherwise I can find no reasoning for the
>> location of this error at the 48th parallel.
>
>> Anyone ever seen something like this?
>
> I have occasionally seen something like this, although I
> have never been able to prove it is happening. There are
> many things that can go wrong, however, when you put a
> contour on a map projection, so I would like to see the
> code before I make a judgement. If we can eliminate the
> obvious problems it is possible that what is left might
> be interesting. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Hi David,
In all it's gory detail... the plotting section... I don't think the
rest would be important, but if you'd like to see what comes before
this, let me know (it's long!). If you care to send me an e-mail
(jonathan.rutz@gmail.com), I can also send you an image of what this
looks like.
; Plot Correlations
-----------------------------------------------------------;
westLon = -130
eastLon = -90
southLat = 25
northLat = 55
C_UP = 240 & C_LO = 3
CLEVELS = [-70,-60,-50,-40,-30,-20,-10,-5,5,10,20,30,40,50,60,70]/100.
CLINES = n_elements(CLEVELS)
CCOLORS = indgen(CLINES+1)*(C_UP-C_LO)/round(CLINES) + C_LO
LEVELS = [CLEVELS(0)-(CLEVELS(1)-CLEVELS(0))*50,CLEVELS]
MULTI_SET, 0, 0, 1, 2
LOADCT, 39
HLS_SET, 90, 030, 100, 100, 060, -70./360, $
90, 030, 100, 100, 180, 70./360, 240, wht = 5
MAP_SET, /LAMBERT, 90, 0, (westLON + eastLON)/2, /GRID, /CONTINENT, /
USA, /ADV, $
LIMIT = [southLAT,westLON,northLAT,eastLON], $
/LABEL, LATDEL = 5, LONDEL = 5, LATLAB = westLON, LONLAB =
southLAT
CONTOUR, Correlations[*,*], LON[*,*], LAT[*,*], /OVERPLOT, /NOERASE, $
LEVELS = LEVELS, C_COLORS = CCOLORS, /CELL_FILL, $
XSTYLE = 1, XRANGE = XRANGE, XTICKS = XTICKS, XTICKV = XTICKV, $
XTICKN = XTICKN, XMINOR = XMINOR, XTICKLEN = XTICKLEN, XMARGIN =
XMARGIN, $
YSTYLE = 1, YRANGE = YRANGE,YTICKS = YTICKS, YTICKV = YTICKV, $
YTICKN = YTICKN, YMINOR = YMINOR, YTICKLEN = YTICKLEN, YMARGIN =
YMARGIN
CONTOUR, Correlations[*,*], LON[*,*], LAT[*,*], /overplot, $
LEVELS = LEVELS, THICK = 1.5, COLOR = 0
MAP_CONTINENTS, COLOR = 0, THICK = 2, /COASTS, /COUNTRIES, /USA
MAP_GRID, /LABEL, LATDEL = 5, LONDEL = 5, LATLAB = westLON, LONLAB =
southLAT
; Colorbar
------------------------------------------------------------ --------;
colorbar, [0.05,0.47,0.85,0.50], LEVELS(1:CLINES), CCOLORS,
'CorrCoef', 0
|