On Friday 01 June 2007 18:52, Jeff Whitaker wrote:
> Jesper:  Here's a better way, that allows you to label the meridians and
> parallels.  It will only work for projection='cyl', although a similar
> solution could be worked up for 'merc' and 'mill'.
<snip>

Thanks,

I have implemented that solution. The only issue I have discovered so far is 
that I also had to recalculate the aspect ratio of the map (since I use this 
to calculate the figure size):

def resetmapbounds(map,llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat):
    map.llcrnrlat = llcrnrlat; map.llcrnrlon = llcrnrlon
    map.urcrnrlat = urcrnrlat; map.urcrnrlon = urcrnrlon
    map.llcrnry = map.llcrnrlat; map.llcrnrx=map.llcrnrlon
    map.urcrnry = map.urcrnrlat; map.urcrnrx=map.urcrnrlon
    map.aspect = (map.urcrnrlat-map.llcrnrlat)/(map.urcrnrlon-map.llcrnrlon)
    return map

This only works for projection='cyl'. For other projections more work is 
needed (see basemap.py).

- Jesper

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to