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

Home » Public Forums » archive » Re: Plotting data on orthographic globe projection
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
Re: Plotting data on orthographic globe projection [message #79415] Wed, 29 February 2012 03:30
John Coxon is currently offline  John Coxon
Messages: 15
Registered: February 2012
Junior Member
On 29/02/2012 11:22, John Coxon wrote:
> On 28/02/2012 21:43, David Fanning wrote:
>> CELL_FILL should *always* be used to put filled contour
>> plots on map projections.
>
> Whenever I have used CELL_FILL it looks like the fill colours were done
> by a five-year-old with a highlighter -- is that normal?

Further testing shows that no, it isn't, and I can't even replicate what
I saw to show to you guys (the code it happened in has been changed
substantially since it happened around six weeks ago).

Ah well, at least now I know!

--
John Coxon
http://www.chickensinenvelopes.net/
Re: Plotting data on orthographic globe projection [message #79416 is a reply to message #79415] Wed, 29 February 2012 03:22 Go to previous message
John Coxon is currently offline  John Coxon
Messages: 15
Registered: February 2012
Junior Member
On 28/02/2012 21:43, David Fanning wrote:
> CELL_FILL should *always* be used to put filled contour
> plots on map projections.

Whenever I have used CELL_FILL it looks like the fill colours were done
by a five-year-old with a highlighter -- is that normal?


--
John Coxon
Re: Plotting data on orthographic globe projection [message #79417 is a reply to message #79416] Tue, 28 February 2012 14:33 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sir Loin Steak writes:

> Brilliant! Thanks a lot David. It's funny how it always turns out to
> be something simple. I'll remember to use cell fill from now on!

Yes, simple and undocumented. This is one of those
things I say--like I used to say "Device,
Decomposed=0"--every chance I get, but it never sinks in,
no matter how many books or articles I write. I happened
to mention it in the presence of some Excelis engineers a
couple of months ago and they looked at me like I was daft.

Let me say it again. If you think colors have meaning,
and should match the values in your colorbar (I realize
this excludes the 2-3 people using the function graphics
colorbar who don't care about any of this), then you
MUST use CELL_FILL instead of FILL when you put filled
contour plots on a map projection. You will get incorrect
results if you do otherwise!

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Plotting data on orthographic globe projection [message #79418 is a reply to message #79417] Tue, 28 February 2012 13:58 Go to previous message
Sir Loin Steak is currently offline  Sir Loin Steak
Messages: 42
Registered: January 2012
Member
On Feb 28, 9:43 pm, David Fanning <n...@idlcoyote.com> wrote:
> Sir Loin Steak writes:
>> I have some data in a (72,36) array, corresponding to 72 longitudes
>> and 36 latitudes. I am wanting to plot them onto a globe, and so have
>> used IDLs map_set and contour routines. However, depending upon which
>> angle I choose to view the image, there are problems with the filling
>> of the contours.
>
>> As an example, see the four images athttp://www.physics.open.ac.uk/~lsteele/globe.png.
>> I have plotted the exact same data in each image, the only difference
>> being I changed the value of 'loncentre' in the plotting routine
>> below:
>
>> ;---------------------------------------
>> lat = findgen(36)*180/35-90
>> lon = findgen(72)*360/71-180
>> latcentre=30
>> loncentre=-70
>> angle=0
>> map_set,latcentre,loncentre,angle,/orthographic,/isotropic
>> loadct, 13
>> contour,reverse(vapour(*,*,250),2),lon,lat,/overplot,
>> levels=findgen(30), /fill
>> map_grid, latdel=5, londel=5, glinestyle=0, glinethick=0.5
>> ;---------------------------------------
>
>> Has anyone used these routines and experienced the same problem? Or
>> can anyone suggest any other routines that produce something similar?
>> I'm stumped!
>
> I would try using the keyword CELL_FILL instead of FILL.
> Not only will these problems probably disappear, but your
> color will actually be correct! :-)
>
>   http://www.idlcoyote.com/color_tips/fill_colors.html
>
> CELL_FILL should *always* be used to put filled contour
> plots on map projections.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")


Brilliant! Thanks a lot David. It's funny how it always turns out to
be something simple. I'll remember to use cell fill from now on!

Liam
Re: Plotting data on orthographic globe projection [message #79419 is a reply to message #79418] Tue, 28 February 2012 13:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sir Loin Steak writes:

> I have some data in a (72,36) array, corresponding to 72 longitudes
> and 36 latitudes. I am wanting to plot them onto a globe, and so have
> used IDLs map_set and contour routines. However, depending upon which
> angle I choose to view the image, there are problems with the filling
> of the contours.
>
> As an example, see the four images at http://www.physics.open.ac.uk/~lsteele/globe.png.
> I have plotted the exact same data in each image, the only difference
> being I changed the value of 'loncentre' in the plotting routine
> below:
>
> ;---------------------------------------
> lat = findgen(36)*180/35-90
> lon = findgen(72)*360/71-180
> latcentre=30
> loncentre=-70
> angle=0
> map_set,latcentre,loncentre,angle,/orthographic,/isotropic
> loadct, 13
> contour,reverse(vapour(*,*,250),2),lon,lat,/overplot,
> levels=findgen(30), /fill
> map_grid, latdel=5, londel=5, glinestyle=0, glinethick=0.5
> ;---------------------------------------
>
> Has anyone used these routines and experienced the same problem? Or
> can anyone suggest any other routines that produce something similar?
> I'm stumped!

I would try using the keyword CELL_FILL instead of FILL.
Not only will these problems probably disappear, but your
color will actually be correct! :-)

http://www.idlcoyote.com/color_tips/fill_colors.html

CELL_FILL should *always* be used to put filled contour
plots on map projections.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plotting data on orthographic globe projection
Next Topic: Further adventures in POLAR_CONTOUR

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

Current Time: Wed Oct 08 15:17:54 PDT 2025

Total time taken to generate the page: 0.00476 seconds