@@ -2185,25 +2185,15 @@ def subplots(
21852185 'wspace' : wspace , 'hspace' : hspace ,
21862186 }
21872187
2188- # Default border spaces
2189- left = _notNone (left , units (rc ['subplots.ylabspace' ]))
2190- right = _notNone (right , units (rc ['subplots.innerspace' ]))
2191- top = _notNone (top , units (rc ['subplots.titlespace' ]))
2192- bottom = _notNone (bottom , units (rc ['subplots.xlabspace' ]))
2193- # Default spaces between axes
2188+ # Apply default spaces
2189+ left = _notNone (left , _get_space ('left' ))
2190+ right = _notNone (right , _get_space ('right' ))
2191+ bottom = _notNone (bottom , _get_space ('bottom' ))
2192+ top = _notNone (top , _get_space ('top' ))
21942193 wratios , hratios = [* wratios ], [* hratios ] # copies
21952194 wspace , hspace = np .array (wspace ), np .array (hspace ) # also copies!
2196- wspace [wspace == None ] = ( # noqa
2197- units (rc ['subplots.innerspace' ]) if sharey == 3 else
2198- units (rc ['subplots.ylabspace' ]) - units (rc ['subplots.titlespace' ])
2199- if sharey in (1 , 2 ) else units (rc ['subplots.ylabspace' ]))
2200- hspace [hspace == None ] = ( # noqa
2201- units (rc ['subplots.titlespace' ]) + units (rc ['subplots.innerspace' ])
2202- if sharex == 3 else units (rc ['subplots.xlabspace' ])
2203- if sharex in (1 , 2 ) else units (rc ['subplots.titlespace' ])
2204- + units (rc ['subplots.xlabspace' ])
2205- )
2206- wspace , hspace = wspace .tolist (), hspace .tolist ()
2195+ wspace [wspace == None ] = _get_space ('wspace' , sharex ) # noqa
2196+ hspace [hspace == None ] = _get_space ('hspace' , sharey ) # noqa
22072197
22082198 # Parse arguments, fix dimensions in light of desired aspect ratio
22092199 figsize , gridspec_kw , subplots_kw = _subplots_geometry (
0 commit comments