+
     ]io.  c                   s    ^ RI t ^ RIt^ RIHtHtHt ^ RIHt	 ^ RI
HtHt ^ RIHt ^ RIHt  ! R R]4      tRt]P&                  P)                  ]R	7       R# )
    N)_api
_docstring
transforms)	_AxesBase_TransformedBoundsLocator)Axis)	Transformc                   s   a a ] tR t^t oRtRV 3R lltR tRR ltRV 3R llt]	P                  ! ]P                  4      RRR/R ll4       tR	 tV 3R
 ltR tR tR tR tRtVtV ;t# )SecondaryAxisz,
General class to hold a Secondary_X/Yaxis.
c                s   < \         P                  ! RR.VR7       W@n        Wn        W n        RV n        V P                  P                  RR7      pV P                  R8X  d9   \        S	V `   ! V. RO3/ VB  V P                  V n
        RR.V n        RR	.V n        M7\        S	V `   ! V. RO3/ VB  V P                  V n
        R	R.V n        RR.V n        R
V n        V P                  W54       V P!                  V4       V P                  R8X  d   V P                  MV P                  pVP#                  \$        P&                  ! 4       4       VP)                  R4       V P*                  V P                  ,          P-                  R4       V P*                  V P                  ,          P-                  R4       V P.                  R8  d   V P                  R
R
R1,          V n        V P1                  V P                  ^ ,          4       R
# )z
See `.secondary_xaxis` and `.secondary_yaxis` for the doc string.
While there is no need for this to be private, it should really be
called by those higher level functions.
xZy)orientationF)ZroottopZbottomZleftrightNZnoneTg      ?)r          ?   -C6?)r    r   r   r   )r   check_in_list
_functions_parent_orientation
_ticks_setZ
get_figuresuper__init__xaxis_axis_locstrings_otherstringsyaxis_parentscaleset_locationset_functionsset_major_locatormtickerZNullLocatorset_ticks_positionspinesset_visible_posset_alignment)
selfZparentr
   location	functions	transformkwargsZfigZ	otheraxis	__class__s
   &&&&&&,  F/usr/lib64/python3.14/site-packages/matplotlib/axes/_secondary_axes.pyr   ZSecondaryAxis.__init__   s    	C:;?#'ll%%5%1#GS"4??DJ %x0D"('!2DGS"4??DJ '0D"'!2D  	(.9% #'"3"3s":DJJ

	##G$7$7$9:$$V,D&&'33E:D$$%11$799s?#//"5D4++A./    c                s   \         P                  ! V P                  VR7       WP                  ^,          8X  d   V P                  RRR1,          V n        V P                  V P                  ^ ,          ,          P	                  R4       V P                  V P                  ^,          ,          P	                  R4       V P
                  P                  V4       V P
                  P                  V4       R# )z
Set if axes spine and labels are drawn at top or bottom (or left/right)
of the Axes.

Parameters
----------
align : {'top', 'bottom', 'left', 'right'}
    Either 'top' or 'bottom' for orientation='x' or
    'left' or 'right' for orientation='y' axis.
)alignNTFr   )r   r   r   r#   r$   r   r"   Zset_label_position)r'   r/   s   &&r-   r&   ZSecondaryAxis.set_alignment<   s     	4++59$$Q''#//"5DD$$Q'(44T:D$$Q'(44U;

%%e,

%%e,r.   c                s:   \         P                  ! \        P                  R3VR7       \	        V\
        4      '       d4   \         P                  ! V P                  VR7       VR9   d   RMRV n        M`\	        V\        P                  4      '       d   Wn        M9\        RV P                  ^ ,          : RV P                  ^,          : RV: 24      hWn        V P                  R	8X  dA   ^ V P                  RR
.pVe,   \        P                  ! V P                  P                   V4      pM>V P                  ^ R
^.pVe+   \        P                  ! W P                  P                   4      pVf   V P                  P                   pV P#                  \%        W24      4       R# )a  
Set the vertical or horizontal location of the axes in
parent-normalized coordinates.

Parameters
----------
location : {'top', 'bottom', 'left', 'right'} or float
    The position to put the secondary axis.  Strings can be 'top' or
    'bottom' for orientation='x' and 'right' or 'left' for
    orientation='y'. A float indicates the relative position on the
    parent Axes to put the new Axes, 0.0 being the bottom (or left)
    and 1.0 being the top (or right).

transform : `.Transform`, optional
    Transform for the location to use. Defaults to
    the parent's ``transAxes``, so locations are normally relative to
    the parent axes.

    .. versionadded:: 3.9
N)r*   )r(   r   g        zlocation must be z, z, or a float, not r	   g|=)r   r   )r   Zcheck_isinstancer   r   
isinstanceZstrr   r   r%   numbersZReal
ValueError_locr   Zblended_transform_factoryr   Z	transAxesZset_axes_locatorr   )r'   r(   r*   Zboundss   &&& r-   r   ZSecondaryAxis.set_locationO   sb   , 	z33T:iP h$$t//(C&*::DI',,// I#D$4$4Q$7#:"##A&));H<IJ J 	# B.F
 $&@@LL**I7	 iiE1-F$&@@||557	 ..I 	7JKr.   c                sF   < V P                  4        \        SV `	  V4       R # N)	_set_limsr   apply_aspect)r'   Zpositionr,      &&r-   r6   ZSecondaryAxis.apply_aspect   s    X&r.   minorFc               s`    V P                   P                  ! W3R V/VB pRV n        RV n        V# )r8   T)r   	set_ticksstaler   )r'   ticksZlabelsr8   r+   Zrets   &&&$, r-   r9   ZSecondaryAxis.set_ticks   s3    jj""5HHH

r.   c                sv  a \        S\        4      '       dI   \        S4      ^8X  d9   \        S^ ,          4      '       d!   \        S^,          4      '       d	   SV n        MI\        S\
        4      '       d   SP                  V3R l3V n        MSf   R R 3V n        M\        R4      hV P                  4        R# )a  
Set how the secondary axis converts limits from the parent Axes.

Parameters
----------
functions : 2-tuple of func, or `Transform` with an inverse.
    Transform between the parent axis values and the secondary axis
    values.

    If supplied as a 2-tuple of functions, the first function is
    the forward transform function and the second is the inverse
    transform.

    If a transform is supplied, then the transform must have an
    inverse.
c                 sB   < SP                  4       P                  V 4      # r4   )Zinvertedr*   )r	   r)   s   &r-   <lambda>-SecondaryAxis.set_functions.<locals>.<lambda>   s    9--/99!<r.   Nc                     V # r4    r	      &r-   r<   r=      s    r.   c                 r>   r4   r?   r@   rA   r-   r<   r=      s    ar.   zfunctions argument of secondary Axes must be a two-tuple of callable functions with the first function being the transform and the second being the inverse)	r0   ZtupleZlenZcallabler   r   r*   r2   
_set_scale)r'   r)   s   &fr-   r   ZSecondaryAxis.set_functions   s    $ y%((S^q-@1&&8IaL+A+A (DO	9--$$<DO *K8DO @ A A 	r.   c                sf   < V P                  4        V P                  4        \        SV `  V4       R# )z
Draw the secondary Axes.

Consults the parent Axes for its limits and converts them
using the converter specified by
`~.axes._secondary_axes.set_functions` (or *functions*
parameter when Axes initialized.)
N)r5   rB   r   draw)r'   Zrendererr,   r7   r-   rC   ZSecondaryAxis.draw   s%     	Xr.   c                sB   V P                   R8X  d2   V P                  P                  P                  4       pV P                  pM0V P                  P
                  P                  4       pV P                  pWP                  8X  d   R# V P                  '       d   V P                  P                  4       pT! VR8X  d   RMRV P                  RRR1,          R7       V P                  '       d0   V P                  P                  \        P                  ! X4      4       Wn        R# )z#
Check if parent has set its scale
r	   NZlogZfunctionlogZfunction)r)   r   )r   r   r   Z	get_scaleZ
set_xscaler   Z
set_yscaler   r   r   Zget_ticklocsr   r    r!   ZFixedLocator)r'   ZpscaleZ	set_scaler;   s   &   r-   rB   ZSecondaryAxis._set_scale   s    
 #\\''113FI\\''113FI&&&???JJ++-E 	6U?-
 OODbD1	3
 ???JJ(()=)=e)DE #r.   c                s   V P                   R8X  d(   V P                  P                  4       pV P                  pM&V P                  P	                  4       pV P
                  pV^ ,          V^,          8  pV P                  ^ ,          ! \        P                  ! V4      4      pV^ ,          V^,          8  pWC8w  d   VRRR1,          pV! V4       R# )zj
Set the limits based on parent limits and the convert method
between the parent and this secondary Axes.
r	   Nr   )	r   r   Zget_xlimZset_xlimZget_ylimZset_ylimr   npZarray)r'   ZlimsZset_limZorderZneworders   &    r-   r5   ZSecondaryAxis._set_lims   s    
 #<<((*DmmG<<((*DmmGQ$q'!q!"((4.17T!W$":Dr.   c                s2    \         P                  ! R4       R# )zR
Secondary Axes cannot set the aspect ratio, so calling this just
sets a warning.
z)Secondary Axes can't set the aspect ratioN)r   Zwarn_external)r'   Zargsr+   s   &*,r-   
set_aspectZSecondaryAxis.set_aspect   s    
 	FGr.   c                s"   V P                   V P                  ,          pVP                  VR7       V P                  P	                  4        F&  pVP
                  VJ g   K  VP                  V4       K(  	  VP                  P                  V4       R# )zl
Change the color of the secondary Axes and all decorators.

Parameters
----------
color : :mpltype:`color`
)ZcolorsN)Z	_axis_mapr   Zset_tick_paramsr#   Zvaluesaxis	set_colorZlabel)r'   ZcolorrF   Zspines   &&  r-   rG   ZSecondaryAxis.set_color  sl     ~~d//0E*[['')EzzT!& * 	

U#r.   )r   r   r3   r   r   r   r   r   r%   r   r:   r4   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r&   r   r6   r   Zcopyr   r9   r   rC   rB   r5   rE   rG   Z__static_attributes__Z__classdictcell__Z__classcell__)r,   Z__classdict__s   @@r-   r   r      sn     )0V-&>L@'
 __T^^$U  %#J#:&H$ $r.   r   a  
Warnings
--------
This method is experimental as of 3.1, and the API may change.

Parameters
----------
location : {'top', 'bottom', 'left', 'right'} or float
    The position to put the secondary axis.  Strings can be 'top' or
    'bottom' for orientation='x' and 'right' or 'left' for
    orientation='y'. A float indicates the relative position on the
    parent Axes to put the new Axes, 0.0 being the bottom (or left)
    and 1.0 being the top (or right).

functions : 2-tuple of func, or Transform with an inverse

    If a 2-tuple of functions, the user specifies the transform
    function and its inverse.  i.e.
    ``functions=(lambda x: 2 / x, lambda x: 2 / x)`` would be an
    reciprocal transform with a factor of 2. Both functions must accept
    numpy arrays as input.

    The user can also directly supply a subclass of
    `.transforms.Transform` so long as it has an inverse.

    See :doc:`/gallery/subplots_axes_and_figures/secondary_axis`
    for examples of making these conversions.

transform : `.Transform`, optional
    If specified, *location* will be
    placed relative to this transform (in the direction of the axis)
    rather than the parent's axis. i.e. a secondary x-axis will
    use the provided y transform and the x transform of the parent.

    .. versionadded:: 3.9

Returns
-------
ax : axes._secondary_axes.SecondaryAxis

Other Parameters
----------------
**kwargs : `~matplotlib.axes.Axes` properties.
    Other miscellaneous Axes parameters.
)_secax_docstring)r1   ZnumpyrD   Z
matplotlibr   r   r   Zmatplotlib.tickerZtickerr!   Zmatplotlib.axes._baser   r   Zmatplotlib.axisr   Zmatplotlib.transformsr   r   rH   ZinterpdZregisterr?   r.   r-   <module>rI      sO      3 3 # F   +F$I F$R, Z     -=  >r.   