+
    Ŝi94                    6   ^ RI Ht ^ RIt^ RIHt ^ RIt^ RIt^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHtHtHtHt ]'       d   ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHtHt RR R lltR tRR R llt RR R llt!RR R llt"R R R llt#R!R R llt$R"R R llt%R t&R# )#    )annotationsN)TYPE_CHECKING)notna)pprint_thing)get_standard_colors)create_subplotsdo_adjust_figuremaybe_adjust_figureset_ticks_props)Hashable)Axes)Figure)	DataFrameIndexSeriesc               4    V ^8  d   QhRRRRRRRRR	R
RR
RR/# )   framer   alphafloatfigsizeztuple[float, float] | Nonegridbooldiagonalstrmarkerrange_padding )formats   "i/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/pandas/plotting/_matplotlib/misc.py__annotate__r!   !   sW     ^ ^^^ (^
 ^ ^ ^ ^    c
           	     	   V P                  4       pVP                  P                  pW,          p\        WVR R7      w  r\	        V^ ^ R7       \        V4      p\        V4      pT;'       g    / pT;'       g    / pV
P                  RR4       . pVP                   F  pVV,          P                  VV,          P                  ,          p\        P                  ! V4      \        P                  ! V4      ppVV,
          V	,          ^,          pVP                  VV,
          VV,           34       K  	  \        VP                  4       EF  w  pp\        VP                  4       EF  w  ppVVV3,          pVV8X  d   VV,          P                  VV,          P                  ,          pVR8X  d   VP                  ! V3/ VB  MnVR9   dh   ^ RIHp TpV! V4      p\        P"                  ! VP                  4       VP                  4       R4      pVP$                  ! VVP'                  V4      3/ VB  VP)                  VV,          4       MVV,          VV,          ,          P                  pVP*                  ! VV,          V,          VV,          V,          3RVR	V/V
B  VP)                  VV,          4       VP-                  VV,          4       VP/                  V4       VP1                  V4       V^ 8w  d   VP2                  P5                  R 4       VV^,
          8w  g   EK  VP6                  P5                  R 4       EK  	  EK  	  \9        VP                  4      ^8  Ede   V^ ,          pV^ ,          ^,          P2                  P;                  4       p V V^ ,          V 8*  V V^,          8*  ,          ,          p V V^ ,          ,
          V^,          V^ ,          ,
          ,          p!V^ ,          ^ ,          P=                  4       p"V!V"^,          V"^ ,          ,
          ,          V"^ ,          ,           p!V^ ,          ^ ,          P2                  P?                  V!4       \        P@                  ! V V PC                  \D        4      8H  4      '       d   V PC                  \D        4      p V^ ,          ^ ,          P2                  PG                  V 4       \I        V^^Z^^ R
7       V# )F)naxesr   axsqueeze)wspacehspace
edgecolorsnonehist)gaussian_kdei  r   r   )
xlabelsizexrot
ylabelsizeyrot)kdedensity)%_get_numeric_datacolumnssizer   r
   r   _get_marker_compat
setdefaultvaluesnpminmaxappend	enumerater+   scipy.statsr,   linspaceplotevaluateset_xlimscatterset_ylim
set_xlabel
set_ylabelyaxisset_visiblexaxislenget_majorticklocsget_ylim	set_ticksallastypeintset_ticklabelsr   )#r   r   r   r%   r   r   r   density_kwds	hist_kwdsr   kwdsdfnr$   figaxesmaskboundaries_listar8   rmin_rmax_
rdelta_extijbr,   ygkdeindcommonlim1locsadjlim0s#   &&&&&&&&&&,                        r    scatter_matrixrj   !   s    
	 	 	"B


AEEeUSIC Aa09D'FRI%%2L 	OOL&)OZZAd1gnn-vvf~rvvf~uem}4q8

 2EJ4FGH	  "**%1bjj)DAqadBAvAd1gnn5 v%GGF0i0!338A'?D++aeegquuw=CGGCs!3D|DOA./ q'DG+33

qE&M2a5=9?GLPT OA./OA./MM!MM!Av$$U+AEz$$U+I * &N 2::q!Awqz113T!W_a9:d1g~$q'DG"34Awqz""$T!WtAw&'$q'1Q
""3'66$$++c**++;;s#DQ
''-DQRAAFKr"   c                H    V \         P                  P                  9  d   R # V # )o)mpllineslineMarkers)r   s   &r    r6   r6      s    SYY***Mr"   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r%   Axes | Nonereturnr   r   )r   s   "r    r!   r!      s-     T TT 	T 
Tr"   c           
     D	   ^ RI Hp R p\        V 4      pW,          P                  4       p	W,          p
V P	                  V^R7      P                  V4      pVf5   VP                  4       pVP                  R^4       VP                  R^4       / p\        \        V	4      VRVR7      pV	 F	  p. . .W&   K  	  \        V P                  4      ^,
          p\        P                  ! \        V4       Uu. uF(  p^\        P                  ,          VV,          ,          NK*  	  up Uu. uF/  p\        P                  ! V4      \        P                   ! V4      3NK1  	  up4      p\        V4       F  pVP"                  V,          P$                  p\        P&                  ! \        P(                  ! V^R7      ^^R7      pVV,          P+                  ^ R7      VP+                  4       ,          pV
P,                  V,          pW,          ^ ,          P/                  V^ ,          4       W,          ^,          P/                  V^,          4       K  	  \1        V	4       FH  w  ppVP2                  ! W,          ^ ,          W,          ^,          3RVV,          R\5        V4      /VB  KJ  	  VP7                  4        VP9                  \:        P<                  P?                  RR	R
R7      4       \A        VVP                  RR7       EF  w  ppVP9                  \:        P<                  P?                  VRRR7      4       V^ ,          R8  dD   V^,          R8  d6   VPC                  V^ ,          R,
          V^,          R,
          VRRRR7       K  V^ ,          Ru;8  d   V^,          8:  d9   M M5VPC                  V^ ,          R,
          V^,          R,           VRRRR7       K  V^,          Ru;8  d   V^ ,          8:  d:   M M6VPC                  V^ ,          R,           V^,          R,
          VRRRR7       EK4  V^ ,          R8  g   EKE  V^,          R8  g   EKV  VPC                  V^ ,          R,           V^,          R,           VRRRR7       EK  	  VPE                  R4       V# u upi u upi )r   Nc                X    \        V 4      p\        V 4      pW,
          W!,
          ,          # N)r:   r;   )seriesr[   ra   s   &  r    	normalizeradviz.<locals>.normalize   s#    KK
qu%%r"   axisrandom
num_colorscolormap
color_typecolorr   label              ?r*   )radius	facecolorTstrictg?grayrighttopsmall)havar5   bottomleftequal)r   r   )#matplotlib.pyplotpyplotrJ   drop_duplicatesdropapplygcarB   rD   r   r4   r9   arrayrangepicossinilocr8   repeatexpand_dimssumiatr<   r=   rC   r   legend	add_patchrm   patchesCircleziptextrz   )r   class_columnr%   r   r~   rT   pltrw   rV   classes	class_colrU   to_plotcolorsklsmr_   tsrowrow_rb   xynames   &&&&&,                  r    radvizr      s    $&
 	E
A!113G#I	Lq	)	/	/		:B	zWWY
B
B*,G w<(xuF Bx  	EMMQA
GLQx)Px!!bee)q1u*=*=x)PQ)PA"&&)RVVAY	)PQ	A 1Xggajyy!4aa@XNNN"SWWY.mmAQqt$Qqt$  G$3


LOLO	
 )	
 s#		

 	
 % IIKLL##Jsf#MN2::d33D
S[[''5F'KLa53;2a53;GG1r!uu}dw5w   US!BqE!GG11   US!BqE!GG1r!uu}dv%g   Uc\beslGG1r!uu}dv(QX  + 42 GGGIc *QQs   /.R"5Rc               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   r%   rq   samplesrP   rr   r   r   )r   s   "r    r!   r!      s8     @ @@ 	@ 	@ 
@r"   c                   ^ RI Hp R p\        V 4      p	W,          p
W,          P                  4       pV P	                  V^R7      p\
        P                  ! \
        P                  ) \
        P                  V4      p\        4       p\        \        V4      VRVR7      p\        \        WRR7      4      pVf@   VP                  4       pVP                  \
        P                  ) \
        P                  4       \        V	4       F  pVP                  V,          P                   pV! V4      pV! V4      pV
P"                  V,          p\%        V4      pVV9  d3   VP'                  V4       VP(                  ! VV3RVV,          R	V/VB  K  VP(                  ! VV3RVV,          /VB  K  	  VP+                  R
R7       VP-                  4        V# )r   Nc                   a  V 3R  lpV# )c                  < S^ ,          pV\         P                  ! R4      ,          p\         P                  ! \         P                  ! S4      ^ 4      p\         P                  ! V\        VP                  ^,           ^,          4      ^34      p\         P                  ! ^ VP                  ^ ,          4      ^,           p\         P                  ! W@4      pV\         P                  ! VR^ \         P                  3,          \         P                  ! V4      ,          VR^\         P                  3,          \         P                  ! V4      ,          ,           ^ R7      ,          pV# )r   g       @:NNNry   )r9   sqrtdeletecopyresizerP   r5   arangeshapeouterr   newaxisr   r   )r   x1resultcoeffs	harmonics	trig_args
amplitudess   &     r    f+andrews_curves.<locals>.function.<locals>.f   s    AB"''#,&F
 YYrwwz2A6FYYvV[[1_,A(BA'FGF 		!V\\!_59I.Ibffq!RZZ'(266)+<<Arzz)*RVVI->>? F
 Mr"   r   )r   r   s   f r    function andrews_curves.<locals>.function   s    	, r"   ry   r{   r|   Fr   r   r   upper rightloc)r   r   rJ   r   r   r9   r?   r   setr   dictr   r   rB   r   r   r8   r   r   addr@   r   r   )r   r   r%   r   r   r~   rT   r   r   rV   r   r   rU   r   used_legendscolor_valuesr   r_   r   r   rb   r   r   s   &&&&&&,                r    andrews_curvesr      ss    $2 	E
A#I!113G	Lq	)B
RUUFBEE7+A UL&w<(xuL #gE:;F	zWWY
RUUFBEE"1XggajSMaDmmAS!$U#GGAqAsA5ADAGGAq4s4t4  II-I GGIIr"   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   rv   r   rW   zFigure | Noner5   rP   r   rr   r   r   )r   s   "r    r!   r!   "  s:     4 44	4 4 	4 4r"   c           	        ^ RI Hp \        V P                  4      p\	        V4       Uu. uF  p\
        P                  ! Wb4      NK  	  pp\        P                  ! V U	u. uF  p	\        P                  ! V	4      NK  	  up	4      p
\        P                  ! V U	u. uF  p	\        P                  ! V	4      NK  	  up	4      p\        P                  ! V U	u. uF%  p	\        V	4      \        V	4      ,           R,          NK'  	  up	4      pVf   VP                  4       p\        \	        V4      4      p. pVP                  ^^^4      pVP                  R4       VP!                  V4       VP"                  ! W3/ VB  VP                  ^^^4      pVP                  R4       VP!                  V4       VP"                  ! W3/ VB  VP                  ^^^4      pVP                  R4       VP!                  V4       VP"                  ! W3/ VB  VP                  ^^^4      pVP                  R4       VP!                  V4       VP$                  ! V
3/ VB  VP                  ^^^4      pVP                  R4       VP!                  V4       VP$                  ! V3/ VB  VP                  ^^^4      pVP                  R4       VP!                  V4       VP$                  ! V3/ VB  V FE  pVP'                  VP)                  4       ^R7       VP'                  VP+                  4       ^R7       KG  	  \-        V4      '       d   VP/                  4        V# u upi u up	i u up	i u up	i )r   N      ?SampleMeanMedianMidrange)fontsize)r   r   listr8   r   r{   sampler9   r   meanmedianr:   r;   figureadd_subplotrE   r<   r@   r+   setpget_xticklabelsget_yticklabelsr	   tight_layout)rv   rW   r5   r   rT   r   data_	samplingssamplingmeansmedians	midrangesxrX   ax1ax2ax3ax4ax5ax6rz   s   &&&&,                 r    bootstrap_plotr   "  s    $ D49'NCNqt*NICHH	B	Hbggh'	BCEhhIFI		(+IFGG?HIy8#h-#h-
'3	.	.yII {jjlU7^AD
//!Q
"CNN8KKHHQ
//!Q
"CNN8KKHHQ 4 
//!Q
"CNN8KKHHQ"T"
//!Q
"CNN6KKHHUd
//!Q
"CNN8KKHHW
//!Q
"CNN:KKHHY$%%'!4%%'!4  JQ DBFIs   MMM+Mc               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r   r   r   r%   rq   use_columnsr   axvlinessort_labelsrr   r   r   )r   s   "r    r!   r!   Y  sN     N NN 		N N N N 
Nr"   c                   ^ RI Hp V	f   R^RR/p	\        V 4      pW,          P                  4       pW,          pVf   V P	                  V^R7      pMW,          p\        4       p\        VP                  4      pVRJ d\   \        P                  ! \        P                  ! \        VP                  4      4      4      '       g   \        R4      hVP                  pMqVeZ   \        P                  ! \        P                  ! V4      4      '       g   \        R4      h\        V4      V8w  d   \        R	4      hTpM\        \        V4      4      pVf   VP                  4       p\        \        V4      VR
VR7      pV
'       d   \        V4      p\        V4      p\!        \#        VVRR7      4      p\        V4       F  pVP$                  V,          P&                  pVP(                  V,          p\+        V4      pVV9  d3   VP-                  V4       VP.                  ! VV3RVV,          RV/VB  Kw  VP.                  ! VV3RVV,          /VB  K  	  V'       d   V F  pVP0                  ! V3/ V	B  K  	  VP3                  V4       VP5                  VP                  4       VP7                  V^ ,          VR,          4       VP9                  RR7       VP;                  4        V# )r   N	linewidthr   blackry   Tz,Columns must be numeric to be used as xticksz xticks specified must be numericz-Length of xticks must match number of columnsr{   r|   r   r   r   r   r   )r   r   rJ   r   r   r   r4   r9   rN   isrealr   
ValueErrorr   r   r   sortedr   r   r   r8   r   r   r   r@   axvline
set_xticksset_xticklabelsrB   r   r   )r   r   colsr%   r   r   xticksr~   r   axvlines_kwdsr   rT   r   rV   r   r   rU   r   ncolsr   r   r   r_   rb   r   r   s   &&&&&&&&&&&,              r    parallel_coordinatesr	  Y  sT    $$a':E
A!113G#I|ZZ1Z-[ UL

OE dvvbiiRZZ 0122KLLJJ		vvbii'((?@@v;%LMMu	zWWY&w<(xuL /l+#g|D9:F1XGGAJmmAS!$U#GGAqAsA5ADAGGAq4s4t4  AJJq*M*  MM!rzz"KK!aeII-I GGIIr"   c               (    V ^8  d   QhRRRRRRRR/# )	r   rv   r   lagrP   r%   rq   rr   r   r   )r   s   "r    r!   r!     s(      V # { d r"   c                   ^ RI Hp VP                  RVP                  R,          4       V P                  pVRV)  pWQR pVf   VP                  4       pVP                  R4       VP                  RV R24       VP                  ! Wg3/ VB  V# )r   Nczpatch.facecolorzy(t)zy(t + ))	r   r   r7   rcParamsr8   r   rE   rF   rC   )rv   r  r%   rT   r   r   y1y2s   &&&,    r    lag_plotr    s    #OOC&789==D	etB	dB	zWWYMM&MMF3%q/"JJrIr"   c               $    V ^8  d   QhRRRRRR/# )r   rv   r   r%   rq   rr   r   r   )r   s   "r    r!   r!     s!       [ D r"   c                .  a
aaa ^ RI Hp \        V 4      o\        P                  ! V 4      oVf5   VP                  4       pVP                  ^S4       VP                  RR4       \        P                  ! S4      o\        P                  ! SS,
          ^,          4      S,          o
V
VVV3R lp\        P                  ! S4      ^,           pV Uu. uF
  qd! V4      NK  	  ppRpRp	VP                  V	\        P                  ! S4      ,          RRR7       VP                  V\        P                  ! S4      ,          RR	7       VP                  R
RR	7       VP                  V) \        P                  ! S4      ,          RR	7       VP                  V	) \        P                  ! S4      ,          RRR7       VP                  R4       VP                  R4       VP                  ! WW3/ VB  RV9   d   VP!                  4        VP#                  4        V# u upi )r   Nr   c                   < SR SV ,
           S,
          SV R  S,
          ,          P                  4       S,          S,          # ru   )r   )hc0r   r   rV   s   &r    rautocorrelation_plot.<locals>.r  s:    gA%$qr(T/:??AAEJJr"   g1\?g`dL@z--grey)rb   	linestyler   )rb   r   r   r   LagAutocorrelationr   g      )r   r   rJ   r9   asarrayr   rB   rD   r   r   r   axhliner   rE   rF   r@   r   r   )rv   r%   rT   r   r  r   r   rb   z95z99r  r   r   rV   s   &&,       @@@@r    autocorrelation_plotr"    s   #FA::fD	zWWY
Aq
D#774=D	"	#a	'BK K 			!qA1C31A
C
CJJrwwqz!TJ@JJrwwqz!J0JJGJ$JJ#
"&J1JJ#
"d&JAMM%MM#$GGAD$
		GGII 	s   Hc                d    \        V \        4      '       d   \        V 4      ^8X  d
   V ^ ,          p V # )   )
isinstancer   rJ   )keyss   &r    unpack_single_str_listr'    s'    $#d)q.AwKr"   )	r   NNFr+   .NNg?)NNN)N   NN)N2   i  )	NNNFNNTNF)r$  Nru   )'
__future__r   r{   typingr   
matplotlibrm   numpyr9   pandas.core.dtypes.missingr   pandas.io.formats.printingr   !pandas.plotting._matplotlib.styler   !pandas.plotting._matplotlib.toolsr   r	   r
   r   collections.abcr   matplotlib.axesr   matplotlib.figurer   pandasr   r   r   rj   r6   r   r   r   r	  r  r"  r'  r   r"   r    <module>r7     sv    "      , 3 A  ($( ^BTn@F4nNb"Br"   