@@ -597,6 +597,14 @@ def invert(x):
597
597
if not (location in ['top' , 'bottom' ] or isinstance (location , Real )):
598
598
raise ValueError ('secondary_xaxis location must be either '
599
599
'a float or "top"/"bottom"' )
600
+ if not (isinstance (transform , mtransforms .Transform ) or transform is None ):
601
+ raise ValueError ('transform must be either an mtransforms.Transform '
602
+ 'or None' )
603
+
604
+ secondary_ax = SecondaryAxis (self , 'x' , location , functions ,
605
+ transform , ** kwargs )
606
+ self .add_child_axes (secondary_ax )
607
+ return secondary_ax
600
608
601
609
secondary_ax = SecondaryAxis (self , 'x' , location , functions ,
602
610
transform , ** kwargs )
@@ -641,6 +649,13 @@ def secondary_yaxis(self, location, *, functions=None, transform=None, **kwargs)
641
649
if not (location in ['left' , 'right' ] or isinstance (location , Real )):
642
650
raise ValueError ('secondary_xaxis location must be either '
643
651
'a float or "left"/"right"' )
652
+ if not (isinstance (transform , mtransforms .Transform ) or transform is None ):
653
+ raise ValueError ('transform must be either an mtransforms.Transform '
<
6508
/code>
654
+ 'or None' )
655
+ secondary_ax = SecondaryAxis (self , 'y' , location , functions ,
656
+ transform , ** kwargs )
657
+ self .add_child_axes (secondary_ax )
658
+ return secondary_ax
644
659
645
660
secondary_ax = SecondaryAxis (self , 'y' , location , functions ,
646
661
transform , ** kwargs )
0 commit comments