Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
subplots() bugfix, calculate aspect from Proj return val
  • Loading branch information
lukelbd committed Jan 7, 2020
commit 5493f61965290dff60733ff169161064a51b43b5
16 changes: 13 additions & 3 deletions proplot/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2249,10 +2249,20 @@ def subplots(
# Custom Basemap and Cartopy axes
else:
package = 'basemap' if basemap[num] else 'geo'
obj, iaspect = projs.Proj(
name, basemap=basemap[num], **proj_kw[num])
obj = projs.Proj(
name, basemap=basemap[num], **proj_kw[num]
)
if num == ref:
aspect = iaspect
if basemap[num]:
aspect = (
(proj.urcrnrx - proj.llcrnrx)
/ (proj.urcrnry - proj.llcrnry)
)
else:
aspect = (
np.diff(proj.x_limits)
/ np.diff(proj.y_limits)
)[0]
axes_kw[num].update({'projection': package, 'map_projection': obj})

# Figure and/or axes dimensions
Expand Down