Hi

I'm running into a problem using the mollweide projection, with the
following simplified code, my actual code doesn't use random data for
values but this is a clearer example to the problem I'm experiencing:

lon = numpy.arange(0, 361, 1)
lat = numpy.arange(-90, 91, 1)
x, y = numpy.meshgrid(lon, lat)
values = numpy.random.random((181, 361))

map = basemap.Basemap(projection='moll', lon_0=0, resolution='c')
map.drawcoastlines()
map.drawcountries()
map.drawmapboundary()
map.drawmeridians(numpy.arange(0,360,30))
map.drawparallels(numpy.arange(-90,90,30))

X, Y = map(x, y)

map.contourf(X, Y, values)

I get the following error:

 WARNING: x coordinate not montonically increasing - contour plot
 may not be what you expect.  If it looks odd, your can either
 adjust the map projection region to be consistent with your data, or
 (if your data is on a global lat/lon grid) use the shiftgrid
 function to adjust the data to be consistent with the map projection
 region (see examples/contour_demo.py).

And the resulting map is incorrect due to the horizontal trends, see
http://tier2.ihepa.ufl.edu/~ram/files/moll.jpg


but if I use the orthographic projection ie:

map = basemap.Basemap(projection='ortho', lat_0=-20, lon_0=-30, resolution='c')

Then there are no errors, and the map is displayed as expected, see
http://tier2.ihepa.ufl.edu/~ram/files/ortho.jpg

I am unsure as to why I am receiving this error for the mollweide
projection, as my coordinate grid is covering the entire surface.  I
am clearly doing something wring here but I don't know what - does
anyone know what is causing this issue?

Cheers

Adam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to