Skip to content

Commit 7ba514d

Browse files
committed
Instantiate figures with correct size
1 parent 8829e40 commit 7ba514d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

proplot/figure.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ def __init__(
588588
self._refaspect_default = 1 # updated for imshow and geographic plots
589589
self._refwidth = units(refwidth, 'in')
590590
self._refheight = units(refheight, 'in')
591-
self._figwidth = units(figwidth, 'in')
592-
self._figheight = units(figheight, 'in')
591+
self._figwidth = figwidth = units(figwidth, 'in')
592+
self._figheight = figheight = units(figheight, 'in')
593593

594594
# Add special consideration for interactive backends
595595
backend = _not_none(rc.backend, '')
@@ -707,6 +707,8 @@ def __init__(
707707
self._render_context = {}
708708
rc_kw, rc_mode = _pop_rc(kwargs)
709709
kw_format = _pop_params(kwargs, self._format_signature)
710+
if figwidth is not None and figheight is not None:
711+
kwargs['figsize'] = (figwidth, figheight)
710712
with self._context_authorized():
711713
super().__init__(**kwargs)
712714

@@ -1065,8 +1067,7 @@ def _add_subplot(self, *args, **kwargs):
10651067

10661068
def _add_subplots(
10671069
self, array=None, nrows=1, ncols=1, order='C', proj=None, projection=None,
1068-
proj_kw=None, projection_kw=None, backend=None, basemap=None,
1069-
**kwargs
1070+
proj_kw=None, projection_kw=None, backend=None, basemap=None, **kwargs
10701071
):
10711072
"""
10721073
The driver function for adding multiple subplots.

0 commit comments

Comments
 (0)