@@ -1542,26 +1542,27 @@ def format(
15421542 # Update the main axes
15431543 if skip_axes : # avoid recursion
15441544 return
1545- names = set () # track used dictionaries
1546- dicts = {
1547- name : _pop_params (kwargs , sig )
1548- for name , sig in paxes .Axes ._format_signatures .items ()
1545+ kws = {
1546+ cls : _pop_params (kwargs , sig )
1547+ for cls , sig in paxes .Axes ._format_signatures .items ()
15491548 }
1549+ classes = set () # track used dictionaries
15501550 for ax in axs :
1551- dict_ = {}
1552- for name in {None , ax ._name }:
1553- names .add (name )
1554- dict_ .update (dicts .get (name , {}))
1555- ax .format (rc_kw = rc_kw , rc_mode = rc_mode , skip_figure = True , ** dict_ , ** kwargs )
1551+ kw = {
1552+ key : value for cls , kw in kws .items ()
1553+ for key , value in kw .items ()
1554+ if isinstance (ax , cls ) and not classes .add (cls )
1555+ }
1556+ ax .format (rc_kw = rc_kw , rc_mode = rc_mode , skip_figure = True , ** kw , ** kwargs )
15561557
15571558 # Warn unused keyword argument(s)
1558- other = {
1559- key : value for name in dicts .keys () - names
1560- for key , value in dicts [name ].items ()
1559+ kw = {
1560+ key : value for name in kws .keys () - classes
1561+ for key , value in kws [name ].items ()
15611562 }
1562- if other :
1563+ if kw :
15631564 warnings ._warn_proplot (
1564- f'Ignoring unused projection-specific format() keyword argument(s): { other } ' # noqa: E501
1565+ f'Ignoring unused projection-specific format() keyword argument(s): { kw } ' # noqa: E501
15651566 )
15661567
15671568 @docstring ._concatenate_inherited
0 commit comments