+
    ŜiA                    z   ^ RI Ht ^ RIHtHtHtHt ^ RIt^ RI	H
t
Ht ^ RIHtHt ^ RIHtHt ^ RIHt ^ RIHtHt ^ R	IHt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( ^ RI)H*t* ^ RI+H,t,H-t-  ! R R]4      t. ! R R].4      t/RR R llt0RR R llt1R R R llt2R!R R llt3R# )"    )annotations)TYPE_CHECKINGAnyLiteralfinalN)
is_integeris_list_like)ABCDataFrameABCIndex)isnaremove_na_arraylike)pprint_thing)LinePlotMPLPlot)create_iter_data_given_byreformat_hist_y_given_by)unpack_single_str_list)create_subplotsflatten_axesmaybe_adjust_figureset_ticks_props)Axes)BarContainer)Figure)Polygon)PlottingOrientation)	DataFrameSeriesc                      ] tR t^8t]R R l4       tRRRRR/R R llltR R	 ltR
 R lt]	RR R ll4       t
R R ltR R lt]]R R l4       4       tR R lt]R R l4       tRtR# )HistPlotc                   V ^8  d   QhRR/# )   returnzLiteral['hist', 'kde'] )formats   "i/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/pandas/plotting/_matplotlib/hist.py__annotate__HistPlot.__annotate__:   s      -     c                	    R # )histr$   selfs   &r&   _kindHistPlot._kind9   s    r)   rangeNweightsc               $    V ^8  d   QhRRRRRR/# )r"   bins#int | np.ndarray | list[np.ndarray]bottomint | np.ndarrayr#   Noner$   )r%   s   "r&   r'   r(   =   s*     , , 2, !	, 
,r)   c               	*   \        V4      '       d   \        P                  ! V4      pW0n        W@n        WPn        VP                  R 4      V n        VP                  R4      V n        \        P                  ! W3/ VB  V P                  V4      V n        R# )xlabelylabelN)r	   nparrayr5   
_bin_ranger1   getr9   r:   r   __init___adjust_binsr3   )r-   datar3   r5   r0   r1   kwargss   &&&&$$,r&   r?   HistPlot.__init__=   sq     XXf%Fjj*jj*.v.%%d+	r)   c                   V ^8  d   QhRR/# )r"   r3   r4   r$   )r%   s   "r&   r'   r(   U   s      !D r)   c                	V   \        V4      '       d   V P                  eh   \        V P                  4      pV P                  P	                  V4      V P
                  ,          pV UUu. uF  w  rEV P                  WQ4      NK  	  pppV# V P                  V P                  V4      pV# u uppi N)r   byr   rA   groupbycolumns_calculate_bins)r-   r3   by_modifiedgroupedkeygroups   &&    r&   r@   HistPlot._adjust_binsU   s    dww"4TWW=))++K8FLSTGjc,,U9GT  ++DIIt< Us   &B%c                    V ^8  d   QhRRRR/# )r"   rA   Series | DataFramer#   
np.ndarrayr$   )r%   s   "r&   r'   r(   _   s     P P$6 P Pr)   c                   VP                  4       P                  4       pVP                  pVP                  ^8X  d   VP	                  R4      pV\        V4      ( ,          p\        P                  ! WBV P                  R7      # )zCalculate bins given data)r3   r0   )	infer_objects_get_numeric_datavaluesndimreshaper   r;   histogram_bin_edgesr=   )r-   rA   r3   	nd_valuesrW   s   &&&  r&   rJ   HistPlot._calculate_bins_   se    &&(::<	!!>>Q^^B'Ff&%%ftOOr)   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r"   axr   yrR   r5   r6   
column_numintr#   z5BarContainer | Polygon | list[BarContainer | Polygon]r$   )r%   s   "r&   r'   r(   k   s<       
 !  
?r)   c               	:   V^ 8X  d#   V P                  W\        V4      ^,
          4       \        P                  ! \        V4      ^,
          4      p	W@P	                  WWR,          4      ,           pVP
                  ! V3RVRV/VB w  rpV P                  WV
4       V# )r   labelr3   r5   )_initialize_stackerlenr;   zeros_get_stacked_valuesr+   _update_stacker)clsr^   r_   styler5   r`   stacking_idr3   kwdsbasenpatchess   &&&&&&&$,   r&   _plotHistPlot._plotj   s     ?##BSY]CxxD	A&11"4gWW771G4GG$GBQ/r)   c                    V ^8  d   QhRRRR/# )r"   figr   r#   r7   r$   )r%   s   "r&   r'   r(      s     .B .Bf .B .Br)   c                	    V P                  4       pV P                  4       pV P                  e!   \        V P                  V P
                  4      MV P                  p\        V P                  VR7      4       EF  w  pw  rgV P                  V4      pV P                  P                  4       p	V P                  e   V P                  V	R&   \        V4      pV P                  WeR7      pWiR&   V P                  W)WV4      w  rV
e   WR&   V P                  W4       V P                  e4   V	R,          V,          V	R&   V P                   V	R&   V	P#                  R4       V P$                  e)   \'        V 4      P)                  V P$                  WW4      V	R&   \+        WpP                  4      pV P,                  ! W3RVR	V/V	B pV P                  e   VP/                  \        V4      4       V P1                  V^ ,          V4       EK  	  R # )
N)rA   color)indexrc   rj   r3   r1   r`   rk   )_get_colors_get_stacking_idrG   r   rA   r.   	enumerate
_iter_data_get_axrl   copyru   r   _mark_right_label_apply_style_colors_make_plot_keywordsrI   popr1   type_get_column_weightsr   rp   	set_title_append_legend_handles_labels)r-   rs   colorsrk   rA   irc   r_   r^   rl   rj   artistss   &&          r&   
_make_plotHistPlot._make_plot   s   !!#++-
 ww" &dii< 	
 'tD'ABMAzaB99>>#Dzz% $

W 'E**5*:E!M226JKE  %W$$T- ww"#F|AV $W!||'"&t*"@"@q"TY(GG4AjjV1V+VQUVG ww"\%01 ..wqz5AI Cr)   c               $    V ^8  d   QhRRRRRR/# r"   rl   zdict[str, Any]r_   rR   r#   r7   r$   )r%   s   "r&   r'   r(      s!     ! ! !: !$ !r)   c                B    V P                   VR&   V P                  VR&   R# )z/merge BoxPlot/KdePlot properties to passed kwdsr5   r3   N)r5   r3   r-   rl   r_   s   &&&r&   r   HistPlot._make_plot_keywords   s     XyyVr)   c                   V ^8  d   QhRR/# )r"   r   ra   r$   )r%   s   "r&   r'   r(      s       r)   c                	   V e]   \         P                  ! V 4      ^8w  d/   \         P                  ! V 4      R,          ^8w  d    V RV3,          p V \        V4      ( ,          p V #   \         d   p\	        R4      ThR p?ii ; i)N:NNNz?weights must have the same shape as data, or be a single columnrT   )r;   rX   shape
IndexError
ValueErrorr   )r1   r   r_   errs   &&& r&   r   HistPlot._get_column_weights   s     www1$'):2)>!)C%admG tAwh'G " $0 s   A# #A?.A::A?c                    V ^8  d   QhRRRR/# r"   r^   r   r#   r7   r$   )r%   s   "r&   r'   r(      s      4 $ r)   c                	D   V P                   R 8X  dI   TP                  V P                  f   RMV P                  4       VP                  V P                  4       R# VP                  V P                  4       TP                  V P                  f   RMV P                  4       R# )
horizontalN	Frequency)orientation
set_xlabelr9   
set_ylabelr:   r-   r^   rA   s   &&&r&   _post_plot_logicHistPlot._post_plot_logic   sp    |+ MM#{{2 MM$++&MM$++&MM#{{2r)   c                   V ^8  d   QhRR/# )r"   r#   r   r$   )r%   s   "r&   r'   r(      s      0 r)   c                	L    V P                   P                  R R4      R8X  d   R# R# )r   Nr   vertical)rl   r>   r,   s   &r&   r   HistPlot.orientation   s    99==-=r)   )r=   r3   r5   r1   r9   r:   )
   r   )Nr   r   N)__name__
__module____qualname____firstlineno__propertyr.   r?   r@   rJ   classmethodrp   r   r   r   staticmethodr   r   r   __static_attributes__r$   r)   r&   r    r    8   s     , , , ,0P  ..B`!      r)   r    c                      ] tR t^t]R R l4       t]R R l4       tRRR/R R lllt]R	 R
 l4       t	]
RR R ll4       tR R ltR R ltRtR# )KdePlotc                   V ^8  d   QhRR/# )r"   r#   zLiteral['kde']r$   )r%   s   "r&   r'   KdePlot.__annotate__   s      ~ r)   c                	    R # )kder$   r,   s   &r&   r.   KdePlot._kind   s    r)   c                   V ^8  d   QhRR/# )r"   r#   zLiteral['vertical']r$   )r%   s   "r&   r'   r      s      0 r)   c                	    R # )r   r$   r,   s   &r&   r   KdePlot.orientation   s    r)   Nr1   c                   V ^8  d   QhRR/# r"   r#   r7   r$   )r%   s   "r&   r'   r      s      	r)   c               	X    \         P                  ! W3/ VB  W n        W0n        W@n        R # rF   )r   r?   	bw_methodindr1   )r-   rA   r   r   r1   rB   s   &&&&$,r&   r?   KdePlot.__init__   s&     	.v."r)   c                   V ^8  d   QhRR/# )r"   r_   rR   r$   )r%   s   "r&   r'   r      s      J r)   c                	h   Vf   \         P                  ! V 4      \         P                  ! V 4      ,
          p\         P                  ! \         P                  ! V 4      RV,          ,
          \         P                  ! V 4      RV,          ,           R4      pV# \	        V4      '       d   \         P                  ! V 4      \         P                  ! V 4      ,
          p\         P                  ! \         P                  ! V 4      RV,          ,
          \         P                  ! V 4      RV,          ,           V4      pV# )N      ?i  )r;   nanmaxnanminlinspacer   )r_   r   sample_ranges   && r&   _get_indKdePlot._get_ind   s    ;99Q<"))A,6L++		!s\11		!s\11C 
 __99Q<"))A,6L++		!s\11		!s\11C
 
r)   c               $    V ^8  d   QhRRRRRR/# )r"   r^   r   r_   rR   rk   
int | Noner$   )r%   s   "r&   r'   r     s(         r)   c	                	    ^ RI Hp
 \        V4      pV
! W$VR7      pVf   Q hVP                  V4      p\        P
                  ! WV3RV/V	B pV# )r   )gaussian_kde)r   r1   rj   )scipy.statsr   r   evaluater   rp   )ri   r^   r_   rj   r   r1   r   r`   rk   rl   r   gkdeliness   &&&&&&&&&,   r&   rp   KdePlot._plot  sV     	-"AGD MM#bq>>>r)   c               $    V ^8  d   QhRRRRRR/# r   r$   )r%   s   "r&   r'   r     s!     ; ; ;: ;$ ;r)   c                	t    V P                   VR &   \        V 4      P                  W P                  R7      VR&   R# )r   )r   r   N)r   r   r   r   r   s   &&&r&   r   KdePlot._make_plot_keywords  s/     NN[4j))!):Ur)   c                    V ^8  d   QhRRRR/# r   r$   )r%   s   "r&   r'   r   "  s     ! !4 !$ !r)   c                	(    VP                  R 4       R# )DensityN)r   r   s   &&&r&   r   KdePlot._post_plot_logic"  s    
i r)   )r   r   r1   )NN)NNNNNN)r   r   r   r   r   r.   r   r?   r   r   r   rp   r   r   r   r$   r)   r&   r   r      sq       9=   $  .;! !r)   r   c               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r"   rA   rQ   numeric_onlyboolfigsizetuple[float, float] | Nonesharexshareyrotfloatr$   )r%   s   "r&   r'   r'   &  sF     & &
&
 & (& & & 
&r)   c           	        VR 8X  d   \        R4      hVP                  V4      pVe	   W,          p\        V4      p\        WWgWR7      w  r\	        \        V4      VRR7       F[  w  p
w  ppV'       d'   \        V\        4      '       d   VP                  4       pV ! VV
3/ VB  V
P                  \        V4      4       K]  	  W3# )defaultzNfigsize='default' is no longer supported. Specify figure size by tuple instead)naxesr   r   r   r^   layoutFstrict)r   rH   re   r   zipr   
isinstancer
   rV   r   r   )plotfrA   columnrG   r   r   r   r   r   r   r^   rB   rL   r   rs   axesrM   rN   s   &&&&&&&&&&&,      r&   _grouped_plotr   &  s      )3
 	

 ll2G/LEVrIC  T 2GEJLS%Jul;;++-EeR"6"
\#&'	 K 9r)   c               @    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRR/
# )r"   rA   rQ   r3   ra   r   r   r   r   r   r   r   grid
xlabelsizer   
ylabelsizelegendr$   )r%   s   "r&   r'   r'   O  sz     O O
O
 O (O O O 
O O O O  !Or)   c                4  aaa S'       dD   RS9  g   Q hV P                   ^8X  d   V P                  SR&   MVf   V P                  SR&   MVSR&   R VVV3R llpVf   T	p\        VV VVVVVVVV	R7
      w  pp\	        VWWR7       \        VRRRRR	R
R7       V# )a  
Grouped histogram

Parameters
----------
data : Series/DataFrame
column : object, optional
by : object, optional
ax : axes, optional
bins : int, default 50
figsize : tuple, optional
layout : optional
sharex : bool, default False
sharey : bool, default False
rot : float, default 90
grid : bool, default True
legend: : bool, default False
kwargs : dict, keyword arguments passed to matplotlib.Axes.hist

Returns
-------
collection of Matplotlib Axes
rc   c                   V ^8  d   QhRR/# r   r$   )r%   s   "r&   r'   #_grouped_hist.<locals>.__annotate__  s       r)   c                   < VP                   ! V P                  4       P                  3R S/SB  S'       d   VP                  4        R# R# )r3   N)r+   dropnarW   r   )rN   r^   r3   rB   r   s   &&r&   
plot_group!_grouped_hist.<locals>.plot_group  s6    
%%;D;F;IIK r)   )r   rG   r   r   r^   r   r   r   r   xrotr   yrotg333333?g?g?r   333333?)r5   topleftrighthspacewspace)rX   namerI   r   r   r   )rA   r   rG   r^   r3   r   r   r   r   r   r   r   r   r   r   r   rB   r   rs   r   s   &&&&f&&&&&&&&&&fl   r&   _grouped_histr  O  s    T f$$$99>"iiF7O^"llF7O$F7O 
 |IC : Dc3s3 Kr)   c               4    V ^8  d   QhRRRRRRRRRR	R
RRR/# )r"   r-   r   r   r   r   r   r   r   r   r3   ra   r   r$   )r%   s   "r&   r'   r'     sY     I I
I 	I
 I I (I I Ir)   c                   ^ RI Hp V
'       d   RV9   d   \        R4      hVEfq   VP                  RR4      e   \        R4      hTP	                  RVP                  4       '       d   VP                  4       MVP                  VR7      4      pVe:   \        V4      \        VP                  4       4      8w  d   VP                  ! VRR	/  Vf   VP                  4       pM VP                  4       V8w  d   \        R
4      hV P                  4       P                  pV
'       d   V P                   VR&   VP"                  ! V3RV	/VB  V
'       d   VP%                  4        VP'                  V4       \(        P*                  ! V.4      p\-        VVVVVR7       M2RV9   d   \        R4      h\/        V 3RVRVRVRVRV	RVRVRVRVRV
/
VB p\1        VR4      '       d+   VP2                  ^8X  d   \5        V4      ^8X  d
   V^ ,          # V# )r   Nrc    Cannot use both legend and labelr   z7The 'layout' keyword is not supported when 'by' is Nonefigure)r   forwardTz&passed axis not bound to passed figurer3   r   z`Cannot pass 'figure' when using the 'by' argument, since a new 'Figure' instance will be createdrG   r^   r   r   r   r   r   r   r   rX   )matplotlib.pyplotpyplotr   r>   r   get_fignumsgcfr  tupleget_size_inchesset_size_inchesgca
get_figureAssertionErrorr   rW   r  r+   r   r   r;   r<   r   r  hasattrrX   re   )r-   rG   r^   r   r   r   r   r   r   r3   r   rl   pltrs   rW   r   s   &&&&&&&&&&&,    r&   hist_seriesr    s    $'T/;<<	z88Hd#/VWWhh3??#4#4cggi#**W*:U
 5>U3;N;N;P5Q#Q7$7:B]]_# !IJJ%% IIDM
*T*T*IIK
xx~!!	
 tO  

 
 	

 
 
 "
 
 "
 
 
 
 tV99>c$i1n7NKr)   c               <    V ^8  d   QhRRRRRRRRRRR	RR
RRRRR/	# )r"   rA   r   r   r   r   r   r   r   r   r   r   r3   ra   r   r$   )r%   s   "r&   r'   r'     so     Q Q
Q 	Q
 Q Q Q Q (Q Q Qr)   c                l   V'       d   R V9   d   \        R4      hVe+   \        V 3RVRVRVRVRVRV	RV
R	VR
VRVRVRVRVRV/VB pV# Ve7   \        V\        \        P
                  \        34      '       g   V.pW,          p V P                  \        P                  RR3RR7      p \        V P                  4      pV^ 8X  d   \        R4      h\        VVRV	V
VVR7      w  ppR V9  p\        \        V4      V P                  RR7       F  w  ppV'       d   V'       d   VVR &   VP                  ! V V,          P                  4       P                   3R
V/VB  VP#                  V4       VP%                  V4       V'       g   K{  VP'                  4        K  	  \)        VWEWgR7       \+        VRRR7       V# )rc   r  r   rG   r^   r   r   r   r   r   r3   r   r   r   r   r   
datetime64
datetimetz	timedelta)includeexcludezDhist method requires numerical or datetime columns, nothing to plot.F)r   r^   squeezer   r   r   r   r   r   r   )r   r   )r   r  r   listr;   ndarrayr   select_dtypesnumberre   rI   r   r   r   r+   r   rW   r   r   r   r   r   )rA   r   rG   r   r   r   r   r   r^   r   r   r   r   r3   r   rl   r   r   rs   can_set_labelcols   &&&&&&&&&&&&&&&,     r&   
hist_framer#    s   $ 'T/;<<	~

 
 	

 
 
 
 
 
 
 "
 
 "
 
 
  !
$ &4X">??XF|L,7  D EzR
 	
  IC 4'M|D)4<<FCmDM
S	  "))===
S
6IIK G : C4Kr)   )	NNTNTTNr   N)NNN2   NNFFZ   TNNNNF)
NNTNNNNNr   F)NNTNNNNNFFNNr   F)4
__future__r   typingr   r   r   r   numpyr;   pandas.core.dtypes.commonr   r	   pandas.core.dtypes.genericr
   r   pandas.core.dtypes.missingr   r   pandas.io.formats.printingr    pandas.plotting._matplotlib.corer   r   #pandas.plotting._matplotlib.groupbyr   r    pandas.plotting._matplotlib.miscr   !pandas.plotting._matplotlib.toolsr   r   r   r   matplotlib.axesr   matplotlib.containerr   matplotlib.figurer   matplotlib.patchesr   pandas._typingr   pandasr   r   r    r   r   r  r  r#  r$   r)   r&   <module>r7     s    "  
 4 D  $1(*2ex ePC!h C!L&ROdIXQ Qr)   