Shifting grid with matplotlib
<p>I'm plotting data which is formatted between 0 and 360 degrees. I'm trying to plot this on cyl or merc projection, but it is only showing data from 0 onwards (I want to plot the data with the GMT in the center, so need the data on a lon grid of -180 to 180). If I shift the grid (lon = lon -180) then all data shows, but the data is in the wrong place by -180 degrees.</p>

<p>Issue:</p>

<p><a href="https://i.stack.imgur.com/HEdsl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HEdsl.png" alt="enter image description here"></a></p>

<p>Works fine in ortho projection though. Relevant code below.</p>

<pre><code>lat = np.linspace(90,-90,721)
lon = np.linspace(0,360,1440) 
m = Basemap(projection='cyl',llcrnrlat=-90,urcrnrlat=90,llcrnrlon=0,urcrnrlon=360,resolution='c',)
X, Y = np.meshgrid(lon, lat)
X, Y = m(X, Y)
cs = m.contourf(X,Y,Plot,scale, cmap=cmap)
</code></pre>