gL iGddlmZddlmZmZmZddlZddlZddl m Z ddl Z ddl mZddlmZddlmZddlmZdd lmZdd lmZddlZddlmcmZdd lm Z dd l!m"Z"dd l#m$Z$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+m,Z,m-Z-erddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddZ8Gdde$Z9ddZ: d d!dZ; d" d#dZ< d" d#dZ= d$ d%dZ>y)&) annotations) TYPE_CHECKINGLiteral NamedTupleN)setp)lib)cache_readonly)find_stack_level) is_dict_like) ABCSeries)remove_na_arraylike)Version) pprint_thing)LinePlotMPLPlot)create_iter_data_given_by)get_standard_colors)create_subplots flatten_axesmaybe_adjust_figure) Collection)Axes)Figure)Line2D)MatplotlibColorc v|r|jn|j}t|t|k7rWtt|t|\}}t t j t dkr |dk(sJ|||z}|r|j|fi|y|j|fi|y)zSet the tick labels of a given axis. Due to https://github.com/matplotlib/matplotlib/pull/17266, we need to handle the case of repeated ticks (due to `FixedLocator`) and thus we duplicate the number of labels. z3.10rN) get_xticks get_ytickslendivmodrmpl __version__set_xticklabelsset_yticklabels)axlabels is_verticalkwargsticksi remainders i/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/plotting/_matplotlib/boxplot.py_set_ticklabelsr-1s +BMMO E 5zS[ c%j#f+6 9 3?? #gfo 5> ,9 ,>! 6,V,6,V,ceZdZeddZdZdZGddeZdddZ e d ddZ dZ e d Ze d Ze d Ze d Ze d Z d ddZddZddZddZddZeddZefdZxZS) BoxPlotcy)Nboxselfs r,_kindz BoxPlot._kindEsr. horizontal)Naxesdictbothc"eZdZUded<ded<y) BoxPlot.BPrr%zdict[str, list[Line2D]]linesN)__name__ __module__ __qualname____annotations__r3r.r,BPr<Ms &&r.rBc ||jvr td||_tj||fi||j r|j dk(rd|_yd|_yy)Nz2return_type must be {None, 'axes', 'dict', 'both'}verticalF) _valid_return_types ValueError return_typer__init__subplots orientationsharexsharey)r5datarGr(s r,rHzBoxPlot.__init__Rsc d66 6QR R&t.v. ==:-# # r.c t|jdk(r[|Dcgc] }t|}}|Dcgc]7}|jdkDr|n#tjtj g9}}n t|}|j |fi|}|dk(r||fS|dk(r|j|||fS||fScc}wcc}w)Nrr9r:r%r=)ndimr sizenparraynanboxplotrB) clsr%y column_numrGkwdsvysbps r,_plotz BoxPlot._plotcs 66Q;234Q%a(4B4DFFaqvvz!rxx'99FBF$Q'B RZZ #d # & r6M F "66Rr6*B. .r6M5Gs B0>&$,,7DJJ/$--Ezz5T%5%5Hjj3DOOG::-DHgt4 r>#D djjA"#1A1AEIGC    #"D 59YY5F5FGTl4(GFG>>7|jjddryy)NvertTrDr7)rZrr4s r,rJzBoxPlot.orientations 99== &r.cH|j t|S|jSr)rGsuperresultr)r5 __class__s r,rzBoxPlot.result s%    #7> !## #r.)returnzLiteral['box'])r8)rGstrrNone)Nr8)r%rrXz np.ndarrayrGr)Nrl)rzQdict[str, MatplotlibColor] | MatplotlibColor | Collection[MatplotlibColor] | Nonerrrr)rrrr)r%rrr)rz!Literal['horizontal', 'vertical'])r>r?r@propertyr6 _layout_typerErrBrH classmethodr^rpr rtrxr{r}rrrrrrrJr __classcell__)rs@r,r0r0Ds-  L8'Z' $"JP$DG**UU$$$$$$$$      ="8t 5  $$r.r0c .|jdst|d|dd|jdst|d|dd|jdst|d |d d|jd st|d |d dyy)Nboxpropsrbr)rlalpha whiskerpropsrc medianpropsrdrOcappropsrerr)rr)r]rrZs r,rrs 88J  R[ ! A6 88N # R ^9Q._get_colorsus%2+63''4( F#F #C E!H$=> "(,,.JCj(49|C01(?uE66@\C   F# r.cV|jdd|jdd}}|r|jt||r|jt||Dcgc] }t|}}|Dcgc]&}t j t |t(}}|j|fi|} |jd t|||jdd t|fd i| d k(r|S dk(rtj|| S|Scc}wcc}w) Nrrrr:)axis labelsizerT)r%r&r'rotationrr9rP)rrrrrSasarrayr rrV tick_paramsr-rrr0rB) rrr%rZrrrr[r]rfontsizerGrots r, plot_groupzboxplot..plot_groups(D1488Hd3K  MM,v. /  MM,v. /)-.A Q..LRSq"**036BSS RZZ '$ '   NN(N ; $DHHVT,BS  r4V4t4 & I F "::2:. .I%/Ss "D!:+D&)rrrrr%rrGr8z7The 'layout' keyword is not supported when 'by' is Nonezfigure.figsizez;boxplot method requires numerical columns, nothing to plot.)r%r)matplotlib.pyplotpyplotr0rErFrkr to_framerrr rc_contextgcarrrrrr)rMcolumnrr%rrrrrrGrZpltrrrrrcrrs `` `` @r,rVrV^s$'555GHH$ "}}S!:8]F ~ FT5M *( ~)    #    H M/   K  VW W :070C"G,B# WWY %%'DLL! A:M  ?llG=DGT[[]]B?$?  M!  s EE$c ^ddlm} t|f||||||||| d | }| j|S)Nr) rrr%rrrrrrG)rrrVdraw_if_interactive) r5rrr%rrrrrrGrZrs r, boxplot_framersQ$         B Ir.c |durt|} t| d|| | ||\} }t|}tjt }t ||D]I\\}}}|jd|||||d| }|jt|||j|<Kt| ddddd |St |\}}|jd k(rtj||d }n+t|d kDr|d j|d d}n|d }|Ktj |}tj"j%||g}t'|j(}|jd|||||||d| }|S)NTF)rsqueezer%rKrLrrr)r%rrrrrrrrrrr)rr)rrrrr%rrr3)rrrrrrrrVrrlocrrconcatjoincomconvert_to_list_like MultiIndex from_productrr)rrIrrrrr%rrrKrLrZrrr8rrogroupdrframesdf multi_keys r,boxplot_frame_groupbyrs4G # TD!iif% #GT 2  LS%" fxStOSA LLc* +CGGCL   C#CsSVW8 J5G} f <<1 615B [1_qs ,BB  --f5F 22D&>BI)**+Fbjj       Jr.)r%rr&z list[str]r'boolrrr)NNTFNNNN)rrrrrtuple[float, float] | None) NNNNrTNNN)r int | Nonerintrrrr) TNNrTNNNFT)rIrrrrrrrrrrKrrLr)? __future__rtypingrrrri matplotlibr!matplotlib.artistrnumpyrS pandas._libsrpandas.util._decoratorsr pandas.util._exceptionsr pandas.core.dtypes.commonr pandas.core.dtypes.genericr pandas.core.dtypes.missingr pandasrpandas.core.commoncorecommonrpandas.util.versionrpandas.io.formats.printingr pandas.plotting._matplotlib.corerr#pandas.plotting._matplotlib.groupbyr!pandas.plotting._matplotlib.styler!pandas.plotting._matplotlib.toolsrrrcollections.abcrmatplotlib.axesrmatplotlib.figurermatplotlib.linesrpandas._typingrr-r0rrrVrrr3r.r,r.s" "2420: '3JA *$('.-&M$hM$` 6  *. :  :  :(:~   *.     (H   *.     (D  *. ?? ? ?  ?(? ? ?r.