
    -e4                       d Z ddlmZ ddlZ ej        e          ZddlmZm	Z	 ddl
mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlm Z m!Z!m"Z" d	d
l#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) d	dl*m+Z+m,Z, d	dl-m.Z. d	dl/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 dZ7e G d de.                      Z8e G d de8                      Z9 G d de9          Z: G d de9          Z; G d de8          Z< G d de:          Z= G d de:          Z>dS )zM Guide renderers for various kinds of axes that can be added to
Bokeh plots

    )annotationsN   )AlignLabelOrientation)abstract)AutoDatetimeDictEitherEnumFactorFloatIncludeInstanceInstanceDefaultIntNullNullableOverrideSeqStringTextLikeTuple)ScalarFillPropsScalarLinePropsScalarTextProps   )BasicTickFormatterCategoricalTickFormatterDatetimeTickFormatterLogTickFormatterMercatorTickFormatterTickFormatter)	AllLabelsLabelingPolicy)GuideRenderer)BasicTickerCategoricalTickerDatetimeTickerFixedTicker	LogTickerMercatorTickerTicker)AxisCategoricalAxisContinuousAxisDatetimeAxis
LinearAxisLogAxisMercatorAxisc                  B    e Zd ZdZd7 fdZ eeedd          Z  ee e	dd	                    dd
          Z
 ee eee           eee          d          Z eed                               ee          d           Z eed          Z eed          Z edd          Z  e e	e          e          dd          Z e	edd          Z eedd          Z  e!d          Z" e!d          Z# edd          Z$  e e	e          e          dd          Z% e& eee'          ei d           Z( ee) e*e+          d!          Z, eed"d#          Z- e!d          Z. e!d$          Z/ e!d%          Z0 ee1d&d'          Z2 ee1d(d)          Z3 ed*d+          Z4 ed,d-          Z5 ee1d.d/          Z6 ed0d1          Z7 ed2d-          Z8 ee9ee:d3          Z; ee<d4d5          Z= e!d6          Z> xZ?S )8r.   zF A base class that defines common properties for all axis types.

    returnNonec                :     t                      j        |i | d S Nsuper__init__selfargskwargs	__class__s      1lib/python3.11/site-packages/bokeh/models/axes.pyr<   zAxis.__init__]   %    $)&)))))    autoz
    This allows to override the inferred dimensions in contexts that
    support this. This property has no effect when an axes is used
    as a frame axis.

    .. note::
        This property is experimental and may change at any point.
    defaulthelpfrontbackz
    The direction toward which the axis will face.

    .. note::
        This property is experimental and may change at any point.
    zp
    Bounds for the rendered axis. If unset, the axis will span the
    entire plot in the given dimension.
    )rH   aP  
    A Ticker to use for computing locations of axis components.

    The property may also be passed a sequence of floating point numbers as
    a shorthand for creating and configuring a ``FixedTicker``, e.g. the
    following code

    .. code-block:: python

        from bokeh.plotting import figure

        p = figure()
        p.xaxis.ticker = [10, 20, 37.4]

    is equivalent to:

    .. code-block:: python

        from bokeh.plotting import figure
        from bokeh.models import FixedTicker

        p = figure()
        p.xaxis.ticker = FixedTicker(ticks=[10, 20, 37.4])

    c                "    t          |           S )Nticks)r*   rL   s    rB   <lambda>zAxis.<lambda>   s    ;U+C+C+C rD   zW
    A ``TickFormatter`` to use for formatting the visual appearance
    of ticks.
    z[
    A text or LaTeX notation label for the axis, displayed parallel to the axis rule.
       z`
    The distance in pixels that the axis labels should be offset
    from the tick labels.
    parallelz
    What direction the asix label text should be oriented. If a number
    is supplied, the angle of the text is measured from horizontal.
    centerz5
    The alignment of axis label along the axis.
    
axis_labelz'
    The {prop} of the axis label.
    prefixrH   13pxrG   italiczk
    The distance in pixels that the major tick labels should be
    offset from the associated ticks.
    
horizontalz
    What direction the major label text should be oriented. If a number
    is supplied, the angle of the text is measured from horizontal.
    zm
    Provide explicit tick label values for specific tick locations that
    override normal formatting.
    zN
    Allows to filter out labels, e.g. declutter labels to avoid overlap.
    major_labelz.
    The {prop} of the major tick labels.
    
alphabetic11pxaxisz&
    The {prop} of the axis line.
    
major_tickz(
    The {prop} of the major ticks.
    r   z\
    The distance in pixels that major ticks should extend into the
    main plot area.
       z^
    The distance in pixels that major ticks should extend out of the
    main plot area.
    
minor_tickz(
    The {prop} of the minor ticks.
    r   z\
    The distance in pixels that minor ticks should extend into the
    main plot area.
       a4  
    Set to specify a fixed coordinate location to draw the axis. The direction
    of ticks and major labels is determined by the side panel that the axis
    belongs to.

    .. note::
        Axes labels are suppressed when axes are positioned at fixed locations
        inside the central plot area.
    
backgroundz,
    The {prop} of the axis background.
    Nr6   r7   )@__name__
__module____qualname____doc__r<   r   r   r   	dimensionr   facer   r   r	   boundsr   r-   acceptsr   tickerr#   	formatterr   r   rR   axis_label_standoffr   axis_label_orientationr   axis_label_alignr   r   axis_label_propsr   axis_label_text_font_sizeaxis_label_text_font_stylemajor_label_standoffmajor_label_orientationr
   r   major_label_overridesr%   r   r$   major_label_policymajor_label_propsmajor_label_text_alignmajor_label_text_baselinemajor_label_text_font_sizer   
axis_propsmajor_tick_propsmajor_tick_inmajor_tick_outminor_tick_propsminor_tick_inminor_tick_outr   r   fixed_locationr   background_propsbackground_fill_color__classcell__rA   s   @rB   r.   r.   V   sh        
* * * * * * tS& 8 	 	 	I /66$Wf--..v E 	 	 	D VD%%u--uuXx/H/H P 	 	 	F
 Xf $ 	 	 	0 
UCC	D	D1 4  . 	 	 	I
 ( * 	 	 	J #a / 	 	 	
 CVVDD)9$:$:EBB: ] 	 	 	
 tE8 ; 	 	 	 w| K 	 	 	 !) 8 8 8!)(!;!;!;3q 0 	 	 	
 DffTT*:%;%;UCCL ` 	 	 	
 !Dv!6!6" T 	 	 	
 ".//):T:T \ 	 	 	   M 	 	 	 &Xh777 ( > > >!)&!9!9!9 ? 	 	 	J wl J 	 	 	 C ) 	 	 	M
 S * 	 	 	N
 w| K 	 	 	 C ) 	 	 	M
 S * 	 	 	N
 VD% 7 	 	 	N w| K 	 	 	 %HT222rD   r.   c                  $     e Zd ZdZd fdZ xZS )r0   z@ A base class for all numeric, non-categorical axes types.

    r6   r7   c                :     t                      j        |i | d S r9   r:   r=   s      rB   r<   zContinuousAxis.__init__  rC   rD   rb   )rc   rd   re   rf   r<   r   r   s   @rB   r0   r0      sG         
* * * * * * * * * *rD   r0   c                  x     e Zd ZdZd fdZ e ee                    Z e ee	                    Z
 xZS )r2   z An axis that picks nice numbers for tick locations on a
    linear scale. Configured with a ``BasicTickFormatter`` by default.

    r6   r7   c                :     t                      j        |i | d S r9   r:   r=   s      rB   r<   zLinearAxis.__init__  rC   rD   rV   rb   )rc   rd   re   rf   r<   r   r   r'   rk   r   rl   r   r   s   @rB   r2   r2     sv         * * * * * * Xook::;;;F1C!D!DEEEIIIIIrD   r2   c                  x     e Zd ZdZd fdZ e ee                    Z e ee	                    Z
 xZS )r3   z An axis that picks nice numbers for tick locations on a
    log scale. Configured with a ``LogTickFormatter`` by default.

    r6   r7   c                :     t                      j        |i | d S r9   r:   r=   s      rB   r<   zLogAxis.__init__  rC   rD   rV   rb   )rc   rd   re   rf   r<   r   r   r+   rk   r!   rl   r   r   s   @rB   r3   r3     sv         * * * * * * Xooi88999F1A!B!BCCCIIIIIrD   r3   c                      e Zd ZdZd fdZ e ee                    Z e ee	                    Z
 eedd          Z ed	          Z ed
          Z eedd          Z e ee          edd          Z ed          Z ed          Z ed          Z eedd          Z e ee          edd          Z ed          Z ed          Z xZS )r/   z An axis that displays ticks and labels for categorical ranges.

    The ``CategoricalAxis`` can handle factor ranges with up to two levels of
    nesting, including drawing a separator line between top-level groups of
    factors.

    r6   r7   c                :     t                      j        |i | d S r9   r:   r=   s      rB   r<   zCategoricalAxis.__init__,  rC   rD   rV   	separatorz
    The {prop} of the separator line between top-level categorical groups.

    This property always applies to factors in the outermost level of nesting.
    rS   	lightgreyr   groupz
    The {prop} of the group categorical labels.

    This property always applies to factors in the outermost level of nesting.
    If the list of categorical factors is flat (i.e. no nesting) then this
    property has no effect.
    rP   aI  
    What direction the group label text should be oriented.

    If a number is supplied, the angle of the text is measured from horizontal.

    This property always applies to factors in the outermost level of nesting.
    If the list of categorical factors is flat (i.e. no nesting) then this
    property has no effect.
    rF   r[   boldgreysubgroupz
    The {prop} of the subgroup categorical labels.

    This property always applies to factors in the middle level of nesting.
    If the list of categorical factors is has only zero or one levels of nesting,
    then this property has no effect.
    aZ  
    What direction the subgroup label text should be oriented.

    If a number is supplied, the angle of the text is measured from horizontal.

    This property always applies to factors in the middle level of nesting.
    If the list of categorical factors is has only zero or one levels of nesting,
    then this property has no effect.
    rb   )rc   rd   re   rf   r<   r   r   r(   rk   r   rl   r   r   separator_propsseparator_line_colorseparator_line_widthr   group_propsr   r   r   r   group_label_orientationgroup_text_font_sizegroup_text_font_stylegroup_text_colorsubgroup_propssubgroup_label_orientationsubgroup_text_font_sizesubgroup_text_font_styler   r   s   @rB   r/   r/   "  s        * * * * * * Xoo.?@@AAAF1I!J!JKKKIgok I 	 	 	O $8K888#8A...'/' A 	 	 	K %fTT*:%;%;UJ ^ 	 	 	 $8F333$HV444x///W_Z G 	 	 	N "(-=(>(>z a "	 "	 "	 'hv666'x777rD   r/   c                  x     e Zd ZdZd fdZ e ee                    Z e ee	                    Z
 xZS )r1   z A ``LinearAxis`` that picks nice numbers for tick locations on
    a datetime scale. Configured with a ``DatetimeTickFormatter`` by
    default.

    r6   r7   c                :     t                      j        |i | d S r9   r:   r=   s      rB   r<   zDatetimeAxis.__init__o  rC   rD   rV   rb   )rc   rd   re   rf   r<   r   r   r)   rk   r    rl   r   r   s   @rB   r1   r1   g  sv         * * * * * * Xoon==>>>F1F!G!GHHHIIIIIrD   r1   c                  z     e Zd ZdZdd fdZ e ee                    Z e ee	                    Z
 xZS )	r4   a*   An axis that picks nice numbers for tick locations on a
    Mercator scale. Configured with a ``MercatorTickFormatter`` by default.

    Args:
        dimension ('lat' or 'lon', optional) :
            Whether this axis will display latitude or longitude values.
            (default: 'lat')

    latr6   r7   c                     t                      j        |i | t          | j        t                    r|| j        _        t          | j        t                    r|| j        _        d S d S r9   )r;   r<   
isinstancerk   r,   rg   rl   r"   )r>   rg   r?   r@   rA   s       rB   r<   zMercatorAxis.__init__  sn    $)&))) dk>22 	.$-DK!dn&;<< 	1'0DN$$$	1 	1rD   rV   )r   rb   )rc   rd   re   rf   r<   r   r   r,   rk   r"   rl   r   r   s   @rB   r4   r4   v  s{         1 1 1 1 1 1 1 Xoon==>>>F1F!G!GHHHIIIIIrD   r4   )?rf   
__future__r   logging	getLoggerrc   log
core.enumsr   r   core.has_propsr   core.propertiesr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   core.property_mixinsr   r   r   
formattersr   r   r    r!   r"   r#   labelingr$   r%   	renderersr&   tickersr'   r(   r)   r*   r+   r,   r-   __all__r.   r0   r2   r3   r/   r1   r4    rD   rB   <module>r      s    # " " " " " g!! 1 0 0 0 0 0 0 0 % % % % % %                                       ( U T T T T T T T T T                0 / / / / / / / $ $ $ $ $ $                  
c3 c3 c3 c3 c3= c3 c3 
c3J 
* * * * *T * * 
*F F F F F F F FD D D D Dn D D DC8 C8 C8 C8 C8d C8 C8 C8JI I I I I: I I II I I I I: I I I I IrD   