Is this related to https://github.com/matplotlib/basemap/issues/163 ?

On Wed, Aug 27, 2014 at 5:41 AM, ChaoYue <chaoyue...@gmail.com> wrote:
> Hi Michelle,
>
> I might not fully understand your problem, could you have a look at this
> thread and see if it helps?
>
> http://matplotlib.1069221.n5.nabble.com/Fwd-Strange-behaviour-on-plotting-data-on-Ronbinson-projection-using-Basemap-td43222.html#a43233
>
> Cheers,
>
> Chao
>
>
> On Wed, Aug 27, 2014 at 9:58 AM, mmc [via matplotlib] <[hidden email]>
> wrote:
>>
>> Hi All,
>>
>> I am having problems plotting data in Basemap. I have tried some of the
>> different projections such as Robinson and Equidistant Cylindrical, however
>> kept running into the error
>>
>> WARNING: x coordinate not monotonically 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).
>>
>>
>> Having read some other forums, I see that it is due to the fact that the
>> longitude is based on 0-360 rather that -180 to 180. I have been trying to
>> rectify this with shiftgrid.
>>
>> I have used shiftgrid and have moved my longitudes to -180 to 180 however
>> I keep running up with the error:
>>
>>
>> ValueError: lon0 outside of range of lonsin
>>
>>
>> I also manage to get one plot out, which has the right projection I want
>> (I am looking over the Atlantic) however the data isnt shifting in line with
>> the longitudes. Would anyone know why this is the case?
>>
>> I have am using shiftgrid as below and the Basemap projection of
>> Equidistant cylindrical (I have also tried Robinson however end up with
>> similar result of data not moving in line with the longitude)
>>
>> MSLP = aso_mslp.data
>> MSLP_background = np.mean(MSLP, axis = 0)
>>
>>     # shifting grid to run from -180 to 180 rather than 0-360
>>     MSLP_background,lon = shiftgrid(180., MSLP_background, lon,
>> start=False)
>>
>>     #setting the map in order to plot the data
>>     map = Basemap(projection ='cyl', llcrnrlat=-90, urcrnrlat=90,
>> llcrnrlon=-180, urcrnrlon=180, resolution='c')
>>
>> Thanks
>> Michelle
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://matplotlib.1069221.n5.nabble.com/Basemap-shiftgrid-tp43851.html
>> To start a new topic under matplotlib - users, email [hidden email]
>> To unsubscribe from matplotlib, click here.
>> NAML
>
>
>
>
> --
> please visit:
> http://www.globalcarbonatlas.org/
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************
>
> ________________________________
> View this message in context: Re: Basemap shiftgrid
>
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>



-- 
Thomas Caswell
tcasw...@gmail.com

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to