@@ -4627,7 +4627,9 @@ def twinx(self, **kwargs):
4627
4627
For those who are 'picking' artists while using twinx, pick
4628
4628
events are only called for the artists in the top-most Axes.
4629
4629
"""
4630
- ax2 = self ._make_twin_axes (sharex = self , axes_class = type (self ), ** kwargs )
4630
+ if not {"projection" , "polar" , "axes_class" }.intersection (kwargs ):
4631
+ kwargs ["axes_class" ] = type (self )
4632
+ ax2 = self ._make_twin_axes (sharex = self , ** kwargs )
4631
4633
ax2 .yaxis .tick_right ()
4632
4634
ax2 .yaxis .set_label_position ('right' )
4633
4635
ax2 .yaxis .set_offset_position ('right' )
@@ -4663,7 +4665,9 @@ def twiny(self, **kwargs):
4663
4665
For those who are 'picking' artists while using twiny, pick
4664
4666
events are only called for the artists in the top-most Axes.
4665
4667
"""
4666
- ax2 = self ._make_twin_axes (sharey = self , axes_class = type (self ), ** kwargs )
4668
+ if not {"projection" , "polar" , "axes_class" }.intersection (kwargs ):
4669
+ kwargs ["axes_class" ] = type (self )
4670
+ ax2 = self ._make_twin_axes (sharey = self , ** kwargs )
4667
4671
ax2 .xaxis .tick_top ()
4668
4672
ax2 .xaxis .set_label_position ('top' )
4669
4673
ax2 .set_autoscaley_on (self .get_autoscaley_on ())
0 commit comments