@@ -1891,10 +1891,12 @@ def _make_twin_axes(self, *args, **kwargs):
18911891 self ._twinned_axes .join (self , ax2 )
18921892 return ax2
18931893
1894- def _sharex_setup (self , sharex , level ):
1895- """Sets up shared axes. The input is the 'parent' axes, from which
1896- this one will draw its properties."""
1894+ def _sharex_setup (self , sharex , level = None ):
1895+ """Configure shared axes accounting for panels . The input is the
1896+ 'parent' axes, from which this one will draw its properties."""
18971897 # Call Axes method
1898+ if level is None :
1899+ level = self .figure ._sharex
18981900 super ()._sharex_setup (sharex , level ) # sets up panels
18991901 if sharex in (None , self ) or not isinstance (sharex , XYAxes ):
19001902 return
@@ -1904,10 +1906,12 @@ def _sharex_setup(self, sharex, level):
19041906 if level > 1 :
19051907 self ._shared_x_axes .join (self , sharex )
19061908
1907- def _sharey_setup (self , sharey , level ):
1908- """Sets up shared axes. The input is the 'parent' axes, from which
1909- this one will draw its properties."""
1909+ def _sharey_setup (self , sharey , level = None ):
1910+ """Configure shared axes accounting for panels . The input is the
1911+ 'parent' axes, from which this one will draw its properties."""
19101912 # Call Axes method
1913+ if level is None :
1914+ level = self .figure ._sharey
19111915 super ()._sharey_setup (sharey , level )
19121916 if sharey in (None , self ) or not isinstance (sharey , XYAxes ):
19131917 return
0 commit comments