Skip to content

Commit c639612

Browse files
committed
Update geophysical data example
1 parent 077e1ab commit c639612

File tree

3 files changed

+3609
-3260
lines changed

3 files changed

+3609
-3260
lines changed

docs/projection.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ These features are powered by the `~proplot.wrappers.standardize_2d`,
271271
y = plot.arange(-60,60+1,30)
272272
data = np.random.rand(len(y), len(x))
273273
titles = ('Geophysical data demo', 'Global coverage demo')
274-
for globe in (False,True):
274+
for globe in (False,True,):
275275
f, axs = plot.subplots(ncols=2, nrows=2, axwidth=2.5,
276276
proj='kav7', basemap={(1,3):False, (2,4):True})
277277
for i,ax in enumerate(axs):
@@ -281,11 +281,12 @@ These features are powered by the `~proplot.wrappers.standardize_2d`,
281281
f.colorbar(m, loc='b', span=i+1, label='values', tickminor=False, extendsize='1.7em')
282282
else:
283283
ax.pcolor(x, y, data, cmap=cmap, globe=globe, extend='both')
284-
if not globe:
285-
ix = offset + np.linspace(0, 360, 20)
286-
for cmd in (np.sin,np.cos):
287-
iy = cmd(ix*np.pi/180)*60
288-
ax.plot(ix, iy, color='k', lw=0, marker='o')
284+
if globe:
285+
continue
286+
ix = offset + np.linspace(0, 360, 20)
287+
for cmd in (np.sin,np.cos):
288+
iy = cmd(ix*np.pi/180)*60
289+
ax.plot(ix, iy, color='k', lw=0, marker='o')
289290
axs.format(suptitle=titles[globe],
290291
collabels=['Cartopy example', 'Basemap example'],
291292
rowlabels=['Contourf', 'Pcolor'], latlabels='r', lonlabels='b', lonlines=90,

0 commit comments

Comments
 (0)