Hi Thomas
I have managed to get my data to shift in line with my longitude and latitudes,
however now I cannot get it to read out more than one plot.
I am running this is a loop as I want to get 34 plots (of 34 separate years of
the same variable) however once it runs through the loop once and I get a plot,
it stops and I get an error saying
lon0 outside of range of lonsin
Am I able to do this in a loop or are there other things which maybe causing
this?
From: Thomas Caswell [via matplotlib]
[mailto:ml-node+s1069221n43859...@n5.nabble.com]
Sent: 27 August 2014 13:37
To: McCrystall, Michelle R.
Subject: Re: Basemap shiftgrid
Is this related to https://github.com/matplotlib/basemap/issues/163 ?
On Wed, Aug 27, 2014 at 5:41 AM, ChaoYue [hidden
email]/user/SendEmail.jtp?type=nodenode=43859i=0 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
[hidden email]/user/SendEmail.jtp?type=nodenode=43859i=1
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Thomas Caswell
[hidden email]/user/SendEmail.jtp?type=nodenode=43859i=2
--
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
___
Matplotlib-users mailing list
[hidden email]/user/SendEmail.jtp?type=nodenode=43859i=3
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
If you reply to this email, your message will be added to the discussion below:
http://matplotlib.1069221.n5.nabble.com/Basemap-shiftgrid-tp43851p43859.html
To unsubscribe from Basemap shiftgrid, click
herehttp://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=43851code=bWljaG1jckBiYXMuYWMudWt8NDM4NTF8LTQwMzU0MjYzMQ==.
NAMLhttp://matplotlib.1069221