Skip to content

Commit

Permalink
fixes for cartopy migration.
Browse files Browse the repository at this point in the history
Status:
    "python tcevent.py -c examples/yasi.ini"
    outputs a figure that appears sensible
  • Loading branch information
benjimin committed Jul 25, 2019
1 parent dbf352d commit 584fd34
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions PlotInterface/maps.py
Expand Up @@ -258,7 +258,7 @@ def createMap(self, axes, xgrid, ygrid, map_kwargs):

axes.set_extent([x0, x1, y0, y1])

return mapobj, xgrid, ygrid
return axes, xgrid, ygrid

def subplot(self, axes, subfigure):
"""
Expand Down Expand Up @@ -367,8 +367,7 @@ def subplot(self, axes, subfigure):
cmap = selectColormap(lvls)
CS = mapobj.contourf(mx, my, data, levels=lvls,
extend='both', cmap=cmap)
CB = mapobj.colorbar(CS, location='right', pad='5%', ticks=lvls[::2],
fig=self, ax=axes, extend='both')
CB = self.colorbar(CS, ticks=lvls[::2], ax=axes, extend='both')
CB.set_label(cbarlab)
axes.set_title(title)
self.addGraticule(axes, mapobj)
Expand Down Expand Up @@ -403,8 +402,7 @@ def subplot(self, axes, subfigure):
cmap = selectColormap(lvls)
CS = mapobj.contourf(mx, my, masked_data, levels=lvls,
extend='both', cmap=cmap)
CB = mapobj.colorbar(CS, location='right', pad='5%', ticks=lvls[::2],
fig=self, ax=axes, extend='both')
CB = self.colorbar(CS, ticks=lvls[::2], ax=axes, extend='both')
CB.set_label(cbarlab)
axes.set_title(title)
self.labelAxes(axes)
Expand Down Expand Up @@ -440,8 +438,8 @@ def subplot(self, axes, subfigure):
vmax = datarange[1]
CS = mapobj.pcolormesh(mx, my, data, vmin=vmin,
vmax=vmax, cmap=cmap)
CB = mapobj.colorbar(CS, location='bottom', pad='10%',
fig=self, ax=axes)
#CB = self.colorbar(CS, location='bottom', pad=0.1,
# fig=self, ax=axes)
CB.set_label(cbarlab)
axes.set_title(title)
self.addGraticule(axes, mapobj)
Expand Down

0 comments on commit 584fd34

Please sign in to comment.