Re: Contour plot maps using pyNGL

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 19 Jun 2008 09:46:35 -0600 (MDT)

On Thu, 19 Jun 2008, Yuval Itan wrote:

>
> Dear all,
>
> I would be grateful for advice regarding how to perform the following.
>
> I need to make a contour plot on the Eurasia map, longitude range of -15 to 85, and latitude range of 30 to 75. My values are frequency data of lactase persistence in about 50 locations around Eurasia.
>
> Any hint would be much appreciated.
>
> Thanks.

Dear Yuval Itan,

I've attached a sample PyNGL script (and png image) that creates a
mercator map with the lat/lon limits you gave, and some dummy data
overlaid.

You can tweak and add resources (the "res" attributes) to further
customize your map and contours. You can change things like the map
projection, the color map, the size and font of your main title, the
location of your labelbar, etc.

The thing you will probably want to change are the sf* resources I
set. The way they are set now, it's assuming that your values are
evenly spaced across longitude and latitude. If you have arrays that
define your lat/lon coordinates, then you'll want to set sfXArray and
sfYArray instead.

To help you get started with all this, you can visit our gallery
(which has downloadable PyNGL and PyNIO scripts) at:

   http://www.pyngl.ucar.edu/Examples/gallery.shtml

For specific examples on which examples use which resources (so you
can search for examples that use sfXArray and sfYArray), see:

   http://www.pyngl.ucar.edu/Examples/resources.shtml

If you are really new to PyNGL and/or Python, then you can check
out our line-by-line tutorial:

   http://www.pyngl.ucar.edu/Tutorial/

--Mary

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

Received on Thu Jun 19 2008 - 09:46:35 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 19 2008 - 10:44:30 MDT