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

Home » Public Forums » archive » Further adventures in POLAR_CONTOUR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Further adventures in POLAR_CONTOUR [message #79414] Wed, 29 February 2012 03:54
John Coxon is currently offline  John Coxon
Messages: 15
Registered: February 2012
Junior Member
So I wanted to plot two POLAR_CONTOUR plots on the same graph. It will
be useful, below, to know that the colour table I am using has values
1-4 as dark blue to light blue, values 5 and 6 as white, and values 7-10
as light red to dark red:

ctable =
[[0,0,60,120,180,255,255,255,255,255,255],[0,0,60,120,180,25 5,255,180,120,60,0],[0,255,255,255,255,255,255,180,120,60,0] ]

I have data for current density in the Earth's ionosphere that goes
between -1.0 and 1.0 muA/m^2, and I was plotting this in intervals of
0.2 per contour (so at -1.0, -0.8, .. 0.6, 0.8) with the -0.2 and 0.0
levels set to 5 and 6 (so that any data between -0.2 and 0.2 muA/m^2 was
not plotted). A value of -1.0 is coloured with dark blue (1) and a value
of 1.0 was plotted with dark red (10).

However, since then, it has become apparent that it would be useful to
put the contours above some lines that denote the co-ordinate system,
and so I began to experiment with putting two separate contour plots on
top of those lines. (I now know, thanks to David, that /cell_fill
doesn't ruin my fills in the way I thought it did, so this has become
easier and more elegant within the last few minutes!)

I start with:

plot,[-30,30],[-30,30],xstyle = 5,ystyle = 5,position =
[0.09,0.3,0.49,0.86],/nodata

I then use OPLOT in two iterative loops to plot some lines on this
invisible plot area before diving into some POLAR_CONTOURing.

polar_contour,current,mltrad,colat,xrange = [-30,30],xtickname =
colatitudes,xtitle = 'Colatitude [' + deg_sign + '] (MLT = 18 (-ve) & 6
(+ve))',/xstyle,yrange = [-30,30],ytitle = 'Colatitude [' + deg_sign +
'] (MLT = 0 (-ve) & 12 (+ve))',ytickname = colatitudes,/ystyle,levels =
[-1.0,-0.8,-0.6,-0.4],/fill,c_col = [1,2,3,4],position =
[0.09,0.3,0.49,0.86],title = 'Current density',max_value = -0.2

polar_contour,current,mltrad,colat,levels =
[0.2,0.4,0.6,0.8],/cell_fill,c_col = [7,8,9,10],position =
[0.09,0.3,0.49,0.86],/overplot

; Plot contour lines over the colour fills to make it legible.
polar_contour,current,mltrad,colat,levels = indgen(ncontours / 2 - 1) *
0.2 + 0.2,/overplot
polar_contour,current,mltrad,colat,levels = indgen(ncontours / 2) * 0.2
- 1.0,/overplot

The above code does not work, in that it doesn't plot the negative part
of the current density going up to a value of -0.2 as I would like it
to. Actually, what it plots is this:
http://dl.dropbox.com/u/3775836/20101212.north.642.oval.wron g.pdf

If I replace that first POLAR_CONTOUR command thusly (multiply the
currents by -1 and then plot using the same levels as the positive side
of things but removing the max_value keyword and the colours running
from 4 to 1 instead of 1 to 4):

polar_contour,-current,mltrad,colat,xrange = [-30,30],xtickname =
colatitudes,xtitle = 'Colatitude [' + deg_sign + '] (MLT = 18 (-ve) & 6
(+ve))',/xstyle,yrange = [-30,30],ytitle = 'Colatitude [' + deg_sign +
'] (MLT = 0 (-ve) & 12 (+ve))',ytickname = colatitudes,/ystyle,levels =
[0.2,0.4,0.6,0.8],/fill,c_col = [4,3,2,1],position =
[0.09,0.3,0.49,0.86],title = 'Current density'

I get this: http://dl.dropbox.com/u/3775836/20101212.north.642.oval.pdf
(which is what I would have expected both commands to eventually generate).

Why are the two behaving differently? Is this just POLAR_CONTOUR being
POLAR_CONTOUR or is it me not spotting something obvious?



--
John Coxon
http://www.chickensinenvelopes.net/
[Message index]
 
Read Message
Previous Topic: Re: Plotting data on orthographic globe projection
Next Topic: Re: idl_idlbridge weirdness on unix systems

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

Current Time: Wed Oct 08 16:22:39 PDT 2025

Total time taken to generate the page: 0.00255 seconds