Ë
    u™ãjD  ã                  óÈ  — d dl mZ d dlZd dlmZmZ d dlZd dlm	Z	m
Z
mZ d dlmZmZ d dlmZ d dlmZmZm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! d dl"m#Z#m$Z$m%Z% erd dl&m'Z' d dl(m)Z) d dl*m+Z+ d dlm,Z, d"d„Z-	 d#	 	 	 	 	 	 	 d$d„Z.d%d„Z/d%d„Z0d&d„Z1d'd„Z2d(d„Z3d)d„Z4d*d„Z5d#d+d„Z6d,d„Z7d-d„Z8d.d„Z9d/d„Z:d0d„Z;d1d„Z<	 d#	 	 	 	 	 	 	 d2d „Z=	 d#	 	 	 	 	 	 	 	 	 d3d!„Z>y)4é    )ÚannotationsN)ÚTYPE_CHECKINGÚAny)Ú
BaseOffsetÚPeriodÚ	to_offset)ÚOFFSET_TO_PERIOD_FREQSTRÚ	FreqGroup)Úis_integer_dtype)ÚABCDatetimeIndexÚABCPeriodIndexÚABCTimedeltaIndex)ÚDatetimeIndexÚIndex)Úpprint_thing)ÚPeriodConverterÚTimeSeries_DateFormatterÚTimeSeries_DateLocatorÚTimeSeries_TimedeltaFormatterÚbday_count_arrayÚbday_offset_arrayÚbday_to_datetime)Úget_period_aliasÚis_subperiodÚis_superperiod)Ú	timedelta)ÚAxes)ÚNDFrameT)ÚSeriesc                ó€  — t        |«      dk(  rKt        | «      r| S | j                  «       }t        t	        |j
                  «      t        j                  ¬«      S t        | «      rHt        t        j                  | t        j                  ¬«      «      }t        |«      j                  |«      S | j                  |d¬«      S )ab  
    Re-express a time-series plotting index at frequency ``freq``.

    ``index`` is either a PeriodIndex or a plain int64 index of business-day
    ordinals -- the representation used for BDay data to avoid the deprecated
    Period[B].  Returns int64 business-day ordinals when ``freq`` is
    business-daily, otherwise a PeriodIndex at ``freq``.
    ÚB©ÚdtypeÚS)Úhow)Ú_get_period_aliasr   Úto_timestampr   r   ÚvaluesÚnpÚint64r   Úasarrayr   Ú	to_periodÚasfreq)ÚindexÚfreqÚdtiÚdt64s       úq/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/plotting/_matplotlib/timeseries.pyÚ_asfreq_plottingr3   @   s‘   € ô ˜Ó #Ò%Ü˜EÔ"àˆLà× Ñ Ó"ˆÜÔ% c§j¡jÓ1¼¿¹ÔBÐBÜ˜Ôä ¤§¡¨E¼¿¹Ô!BÓCˆÜ˜TÓ"×,Ñ,¨TÓ2Ð2Ø�<‰<˜ #ˆ<Ó&Ð&ó    c                ó¾  — d|v rt        d«      ‚t        || |«      \  }}|€t        d«      ‚|��+||k7  �r%t        ||«      r3| j                  d¬«      } t	        | j
                  |«      | _        |}|| fS t        ||«      r¦d}t        | j
                  «      r-| j                  d¬«      } t	        | j
                  d«      | _         t        | j                  d«      |«      «       j                  «       }  t        | j                  |«      |«      «       j                  «       } |}|| fS t        ||«      st        ||«      rt        |||«       || fS t        d«      ‚|| fS )	Nr%   zz'how' is not a valid keyword for plotting functions. If plotting multiple objects on shared axes, resample manually first.z.Cannot use dynamic axis without frequency infoF©ÚdeepÚlastÚDz!Incompatible frequency conversion)Ú
ValueErrorÚ	_get_freqr   Úcopyr3   r.   Ú_is_supr   ÚgetattrÚresampleÚdropnar   Ú_is_subÚ_upsample_others)ÚseriesÚaxÚkwargsÚ
index_freqr/   Úax_freqr%   s          r2   Úmaybe_resamplerH   W   si  € ð
 ��ÜðHó
ð 	
ô
 ˜b &¨*Ó5�M€Dˆ'à€|ÜÐIÓJÐJàÑ˜t w›Ü˜$ Ô(Ø—[‘[ e�[Ó,ˆFÜ+¨F¯L©L¸'ÓBˆFŒLØˆDð �ˆ<Ðô �T˜7Ô#ØˆCÜ §¡Ô-ð  Ÿ™¨%˜Ó0�Ü/°·±¸cÓB�”Ø7”W˜VŸ_™_¨SÓ1°3Ó7Ó9×@Ñ@ÓBˆFØ;”W˜VŸ_™_¨WÓ5°sÓ;Ó=×DÑDÓFˆFØˆDð
 �ˆ<Ðô	 ˜$ Ô(¬G°D¸'Ô,BÜ˜R  vÔ.ð �ˆ<Ðô Ð@ÓAÐAØ�ˆ<Ðr4   c                ó‚   — | j                  d«      xr t        d|«      xs |j                  d«      xr t        | d«      S ©NÚWr9   )Ú
startswithr   ©Úf1Úf2s     r2   rA   rA   }   s<   € Ø�M‰M˜#ÓÒ8¤<°°RÓ#8ò Ø
�‰�cÓÒ4œ|¨B°Ó4ðr4   c                ó‚   — | j                  d«      xr t        d|«      xs |j                  d«      xr t        | d«      S rJ   )rL   r   rM   s     r2   r=   r=   ƒ   s<   € Ø�M‰M˜#ÓÒ:¤>°#°rÓ#:ò Ø
�‰�cÓÒ6œ~¨b°#Ó6ðr4   c                óâ  — | j                  «       }t        | |«      \  }}t        | |«       d }t        | d«      r| j                  }t        | d«      r| j                  }|�1t        ||«      \  }}|j                  |«       |j                  |«       |�]|j                  dd«      rJt        |«      dkD  r;|j                  «       j                  «       }	|	dk(  rd }	| j                  ||d|	¬«       y y y y )	NÚleft_axÚright_axÚlegendTr   ÚNoneÚbest)ÚlocÚtitle)Ú
get_legendÚ
_replot_axÚhasattrrR   rS   ÚextendÚgetÚlenÚ	get_titleÚget_textrT   )
rD   r/   rE   rT   ÚlinesÚlabelsÚother_axÚrlinesÚrlabelsrX   s
             r2   rB   rB   ‰   sà   € Ø�]‰]‹_€FÜ˜r 4Ó(�M€Eˆ6Üˆr�4Ôà€HÜˆr�9ÔØ—:‘:ˆÜˆr�:ÔØ—;‘;ˆàÐÜ$ X¨tÓ4‰ˆ�Ø�‰�VÔØ�‰�gÔàÐ˜fŸj™j¨°4Ô8¼SÀ»ZÈ!º^Ø"×,Ñ,Ó.×7Ñ7Ó9ˆØ�FŠ?ØˆEØ
�	‰	�%˜ V°5ˆ	Õ9ð	 >LÐ8Ðr4   c                ó\  — t        | dd «      }g | _        | j                  «        t        | |«       g }g }|�ó|D ]î  \  }}}|j	                  d¬«      }t        |j                  |«      |_        | j                  j                  |||f«       t        |t        «      rddl
m} ||   j                  }t        j                  |j                  «      }	|j                   || |j                  j!                  «       |	fi |¤Žd   «       |j                  t#        |j$                  «      «       Œð ||fS )NÚ
_plot_dataFr6   r   )ÚPLOT_CLASSES)r>   rg   ÚclearÚdecorate_axesr<   r3   r.   ÚappendÚ
isinstanceÚstrÚpandas.plotting._matplotlibrh   Ú_plotr)   r+   Ú_valuesÚ	_mpl_reprr   Úname)
rD   r/   Údatara   rb   rC   ÚplotfÚkwdsrh   r(   s
             r2   rZ   rZ       s  € Ü�2�| TÓ*€Dð €B„MØ‡H�H„Jä�"�dÔà€EØ€FØÐØ#'ò 	5ÑˆF�E˜4Ø—[‘[ e�[Ó,ˆFÜ+¨F¯L©L¸$Ó?ˆFŒLà�M‰M× Ñ  &¨%°Ð!6Ô7ô ˜%¤Ô%ÝDà$ UÑ+×1Ñ1�ä—Z‘Z §¡Ó/ˆFØ�L‰L™˜r 6§<¡<×#9Ñ#9Ó#;¸VÑLÀtÑLÈQÑOÔPØ�M‰Mœ, v§{¡{Ó3Õ4ð	5ð  �&ˆ=Ðr4   c                óf   — t        | d«      sg | _        || _        | j                  «       }||_        y)z(Initialize axes for time-series plottingrg   N)r[   rg   r/   Ú	get_xaxis)rD   r/   Úxaxiss      r2   rj   rj   À   s.   € ä�2�|Ô$àˆŒð €B„GØ�L‰L‹N€Eà€E…Jr4   c                óB  — t        | dd«      }|€Gt        | d«      rt        | j                  dd«      }n#t        | d«      rt        | j                  dd«      }|€F| j	                  «       j                  | «      }t        |«      dkD  r|D ]  }t        |dd«      }|€Œ |S  |S )z�
    Get the freq attribute of the ax object if set.
    Also checks shared axes (eg when using secondary yaxis, sharex=True
    or twinx)
    r/   NrR   rS   é   )r>   r[   rR   rS   Úget_shared_x_axesÚget_siblingsr^   )rD   rG   Úshared_axesÚ	shared_axs       r2   Ú_get_ax_freqr   Í   s¬   € ô �b˜& $Ó'€GØ€ä�2�yÔ!Ü˜bŸj™j¨&°$Ó7‰GÜ�R˜Ô$Ü˜bŸk™k¨6°4Ó8ˆGØ€à×*Ñ*Ó,×9Ñ9¸"Ó=ˆÜˆ{Ó˜aÒØ(ò �	Ü! )¨V°TÓ:�ØÑ&ØØ€Nð	ð €Nr4   c                óø   — t        | t        «      r| j                  }| j                  }n%t	        | d¬«      }|j                  }|j                  }t        |«      }|€y |dk(  r|S t        |«      }|dk7  r|› |› �S |S )NT©Ú	is_periodr!   rz   )rl   r   ÚnÚ	rule_coder   r   Úabs)r/   rƒ   ÚfreqstrÚoffsetÚaliass        r2   r&   r&   å   sƒ   € Ü�$œ
Ô#Ø�F‰FˆØ—.‘.‰ä˜4¨4Ô0ˆØ�H‰HˆØ×"Ñ"ˆä˜WÓ%€EØ€}Øð �‚|Øˆô 	ˆA‹€AØˆA‚vØ��U�Gˆ}ÐØ€Lr4   c                óÀ   — |}|€=t        |j                  dd «      }|€$t        |j                  dd «      }t        |d¬«      }t        | «      }|€|}t	        |«      }||fS )Nr/   Ú_inferred_freq_strTr�   )r>   r.   r   r   r&   )rD   rC   rF   r/   rG   s        r2   r;   r;   þ   sp   € ð
 €DØ€|ä�v—|‘| V¨TÓ2ˆØˆ<Ü˜6Ÿ<™<Ð)=¸tÓDˆDÜ˜T¨TÔ2ˆDä˜2Ó€Gð €|Øˆô ˜TÓ"€DØ�ˆ=Ðr4   c                ó  — t        |«      }t        | «      }|€|}n|€t        | j                  «       «      dkD  ry|€yt	        |«      }|€yt        |t        «      r©t        j                  ||«      }t        |d¬«      j                  }|t        j                  j                  k  r|d d j                  S t        |d   |«      }t        |t        «      sJ ‚|j!                  «       j#                  |j$                  «      |d   k(  S y)Nr   FTr�   rz   )Ú_get_index_freqr   r^   Ú	get_linesr&   rl   r   r	   r]   r   Ú_period_dtype_coder
   ÚFR_DAYÚvalueÚis_normalizedr   r'   Útz_localizeÚtz)rD   r.   r/   rG   Úfreq_strÚbaseÚperiods          r2   Úuse_dynamic_xr—     sø   € Ü˜5Ó!€DÜ˜2Ó€Gà€|Ø‰à
ˆ/¤ B§L¡L£NÓ 3°aÒ 7Øà€|Øä  Ó&€HàÐØô �%Ô)Ô*ä+×/Ñ/°¸(ÓCˆÜ˜¨TÔ2×EÑEˆØ”9×#Ñ#×)Ñ)Ò)ð ˜˜!�9×*Ñ*Ð*Ü˜˜a™ (Ó+ˆÜ˜&¤&Ô)Ð)Ð)Ø×"Ñ"Ó$×0Ñ0°·±Ó:¸eÀA¹hÑFÐFØr4   c                óš   — t        |«      }|€t        | «      }|€yt        |«      }|€yt        j                  ||«      }t        |d¬«      S )a  
    Resolve the period frequency to plot `index` with on `ax`, or None.

    The freq is resolved the same way :func:`use_dynamic_x` resolves it, since
    that is what decides whether the dynamic date axis is used at all: the
    index ``freq`` attribute may be unset even when the index is regular (the
    freq is then inferred), and an already-decorated axes carries the freq of
    whatever was plotted on it first.  The result is normalized to a period
    offset, because an axes stores its freq as a period alias string.
    NTr�   )rŒ   r   r&   r	   r]   r   )rD   r.   r/   r”   s       r2   Úget_period_offsetr™   :  sW   € ô ˜5Ó!€DØ€|Ü˜BÓˆØ€|Øä  Ó&€HØÐØÜ'×+Ñ+¨H°hÓ?€HÜ�X¨Ô.Ð.r4   c                óT   — t        | dd «      }|€t        | dd «      }t        |«      }|S )Nr/   rŠ   )r>   r   )r.   r/   s     r2   rŒ   rŒ   R  s2   € Ü�5˜& $Ó'€DØ€|Ü�uÐ2°DÓ9ˆÜ˜‹ˆØ€Kr4   c                ó&  — d }t        |j                  t        t        f«      �rkt	        |j                  «      }|€t        | «      }|€t        d«      ‚t        |«      }t        |j                  t        «      rŒ|dk(  rb|j                  d¬«      }t        t        |j                  j                  d «      j                  «      t        j                  ¬«      |_        ||fS |j                  d «      j                  |¬«      }||fS t        |j                  t        «      rq|dk(  rJ|j                  d¬«      }t        |j                  j                   t        j                  ¬«      |_        ||fS |j                  j#                  |d¬«      |_        ||fS )	Nz*Could not get frequency alias for plottingr!   Fr6   r"   )r/   Ústart)r/   r%   )rl   r.   r   r   rŒ   r   r:   r&   r<   r   r   r’   r(   r)   r*   r,   Úasi8r-   )rD   rs   r”   r/   s       r2   Úmaybe_convert_indexrž   Z  s[  € ð  €HÜ�$—*‘*Ô/´Ð@ÕAÜ˜tŸz™zÓ*ˆàˆ<Ü Ó#ˆDàˆ<ÜÐIÓJÐJä$ TÓ*ˆä�d—j‘jÔ"2Ô3Ø˜3Šð —y‘y e�yÓ,�Ü"Ü$ T§Z¡Z×%;Ñ%;¸DÓ%A×%HÑ%HÓIÜŸ(™(ô�”
ð �ˆ>Ðð ×'Ñ'¨Ó-×7Ñ7¸XÐ7ÓF�ð �ˆ>Ðô ˜Ÿ
™
¤NÔ3Ø˜3Šð —y‘y e�yÓ,�Ü" 4§:¡:§?¡?¼"¿(¹(ÔC�”
ð �ˆ>Ðð "ŸZ™Z×.Ñ.°HÀ'Ð.ÓJ�”
Ø�ˆ>Ðr4   c                ó°   — t        | «      dk(  r*dt        t        |«      «      j                  d«      › d|d›�S t	        t        |«      | ¬«      }d|› d|d›�S )Nr!   zt = z%Y-%m-%dz  y = Ú8f)Úordinalr/   )r&   r   ÚintÚstrftimer   )r/   ÚtÚyÚtime_periods       r2   Ú_format_coordr§   ‡  sa   € Ü˜Ó #Ò%ð Ô&¤s¨1£vÓ.×7Ñ7¸
ÓCÐDÀFÈ1ÈRÈ&ÐQÐQÜ¤ Q£¨dÔ3€KØ�+�˜f Q r FÐ+Ð+r4   c                óÌ   — | j                  «       }t        |d«      r9t        |j                  «       t        «      s|j                  t	        «       «       yyt	        «       |_        y)a§  
    Register PeriodConverter on the x-axis of ``ax``.

    The x-axis holds plain int64 ordinals (Period ordinals for PeriodIndex
    plots; business-day ordinals for BDay), so matplotlib's units machinery
    never registers a converter of its own.  Setting it explicitly is what lets
    ax.set_xlim("2020-01-01"), axvline(timestamp) and user-supplied datetime
    xticks map to those ordinals via _get_datevalue().
    Úset_converterN)rw   r[   rl   Úget_converterr   r©   Ú	converter)rD   rx   s     r2   Úset_period_converterr¬   �  sO   € ð �L‰L‹N€EÜˆu�oÔ&ä˜%×-Ñ-Ó/´ÔAØ×Ñ¤Ó 1Õ2ð Bô *Ó+ˆ�r4   c                ó®  — ddl m} t        |t        «      st	        |«      dk(  r×t        |dd| |¬«      }t        |dd| |¬«      }| j                  j                  |«       | j                  j                  |«       t        |dd| |¬«      }t        |dd| |¬«      }| j                  j                  |«       | j                  j                  |«       t        j                  t        |«      | _        t!        | «       nJt        |t"        «      r/| j                  j                  t%        |j&                  «      «       nt)        d«      ‚|j+                  «        y)aé  
    Pretty-formats the date axis (x-axis).

    Major and minor ticks are automatically set for the frequency of the
    current underlying series.  As the dynamic mode is activated by
    default, changing the limits of the x axis will intelligently change
    the positions of the ticks.

    ``anchor`` is an ordinal the tick grid has to land on; a bar plot passes
    the ordinal of its first bar, since its axis limits sit half a period
    below it.  Line plots leave it unset.
    r   Nr!   TF)Údynamic_modeÚminor_locatorÚplot_objÚanchorzindex type not supported)Úmatplotlib.pyplotÚpyplotrl   r   r&   r   rx   Úset_major_locatorÚset_minor_locatorr   Úset_major_formatterÚset_minor_formatterÚ	functoolsÚpartialr§   Úformat_coordr¬   r   r   ÚunitÚ	TypeErrorÚdraw_if_interactive)	Úsubplotr/   r.   r±   ÚpltÚ
majlocatorÚ
minlocatorÚmajformatterÚminformatters	            r2   Úformat_dateaxisrÄ   £  s4  € õ$ $ô
 �%œÔ(Ô,=¸dÓ,CÀsÒ,Jô ,ØØØØØô
ˆ
ô ,ØØØØØô
ˆ
ð 	�‰×'Ñ'¨
Ô3Ø�‰×'Ñ'¨
Ô3ä/ØØØØØô
ˆô 0ØØØØØô
ˆð 	�‰×)Ñ)¨,Ô7Ø�‰×)Ñ)¨,Ô7ô  )×0Ñ0´ÀÓEˆÔä˜WÕ%ä	�EÔ,Ô	-Ø�‰×)Ñ)Ô*GÈÏ
É
Ó*SÕTäÐ2Ó3Ð3à×ÑÕr4   c                óÌ   — t        | |||«      \  }}t        ||«       t        |d«      rt        |j                  |«       t        |d«      rt        |j                  |«       ||fS )NrR   rS   )rH   rj   r[   rR   rS   )rC   rD   rE   rF   r/   rs   s         r2   Úprepare_ts_datarÆ   í  s^   € ô   ¨¨F°JÓ?�J€Dˆ$ô �"�dÔäˆr�9ÔÜ�b—j‘j $Ô'Üˆr�:ÔÜ�b—k‘k 4Ô(à�ˆ:Ðr4   )r.   r   r/   zstr | BaseOffsetÚreturnr   )N)rC   r   rD   r   rE   údict[str, Any]rF   ú
str | None)rN   rm   rO   rm   rÇ   Úbool)rD   r   r/   r   rE   rÈ   rÇ   rU   )rD   r   r/   r   )rD   r   r/   r   rÇ   rU   )rD   r   )r/   ztimedelta | BaseOffset | strrÇ   rÉ   )rD   r   rC   r   rF   rÉ   )rD   r   r.   r   rÇ   rÊ   )rD   r   r.   r   rÇ   úBaseOffset | None)r.   r   rÇ   rË   )rD   r   rs   r   rÇ   ztuple[NDFrameT, str | None])rÇ   rm   )rD   r   rÇ   rU   )r/   r   r.   r   r±   z
int | NonerÇ   rU   )
rC   r   rD   r   rE   rÈ   rF   rÉ   rÇ   ztuple[BaseOffset | str, Series])?Ú
__future__r   r¸   Útypingr   r   Únumpyr)   Úpandas._libs.tslibsr   r   r   Úpandas._libs.tslibs.dtypesr	   r
   Úpandas.core.dtypes.commonr   Úpandas.core.dtypes.genericr   r   r   Úpandasr   r   Úpandas.io.formats.printingr   Ú%pandas.plotting._matplotlib.converterr   r   r   r   r   r   r   Úpandas.tseries.frequenciesr   r   r   Údatetimer   Úmatplotlib.axesr   Úpandas._typingr   r   r3   rH   rA   r=   rB   rZ   rj   r   r&   r;   r—   r™   rŒ   rž   r§   r¬   rÄ   rÆ   © r4   r2   ú<module>rÛ      sN  ðõ #ã ÷ó
 ÷ñ ÷
õ
 7÷ñ ÷õ
 4÷÷ ñ ÷ñ ñ Ý"å$å'åó'ð0 PTð#Øð#Øð#Ø&4ð#ØBLó#óLóó:ó.ó@
óó0ô2ó0!óH/ó0ó'óZ,ó,ð. ð	Gà
ðGð ðGð ð	Gð
 
óGðV PTðØðØðØ&4ðØBLðà$ôr4   