
    Lem                        d dl Zd dlZd dlZd dl mZ d dlmZ d dlm	Z	m
Z
 d dlmZ ddlmZmZ ddlmZmZ dd	lmZmZ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!m"Z" ddl#m$Z$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.m/Z/ ddl0m1Z1 ddl'm2Z2m3Z3 ddl)m4Z4  G d de.          Z5 G d de5          Z6 G d de-          Z7 G d de$e5          Z8 G d de2e8          Z9 G d  d!e8          Z: G d" d#e-          Z; G d$ d%e2e;          Z< G d& d'e5e-e/          Z= G d( d)e-          Z> G d* d+e%e-e/          Z? G d, d-e&e1e-          Z@ G d. d/e2e@          ZAdS )0    N)cm)LineCollection)DateFormatterdate2num)Version   )	Dimensiondimension_name)Storeabbreviated_exception)
dt64_to_dt	dt_to_int
isdatetimeisfiniteisscalar
match_specsearch_indicesunique_array)HeatMapRaster)interpolate_curve)dim   )	AreaMixin	BarsMixinSpikesMixin)PlotSelector)compute_sizesget_min_distanceget_sideplot_ranges   )ColorbarPlotElementPlot
LegendPlot)PathPlot)AdjoinedPlotmpl_rc_context)mpl_versionc                       e Zd ZdZdS )	ChartPlotz+
    Baseclass to plot Chart elements.
    N)__name__
__module____qualname____doc__     <lib/python3.11/site-packages/holoviews/plotting/mpl/chart.pyr*   r*   !   s           r0   r*   c                   ,   e Zd ZdZ ej        dd          Z ej        g ddd          Z ej        dd	          Z	 ej
        d
eeef          Z ej        dd          Z ej        dd          Zg dZeZ ed          Zd Zd Zd ZdS )	CurvePlotao  
    CurvePlot can plot Curve and ViewMaps of Curve, which can be
    displayed as a single frame or animation. Axes, titles and legends
    are automatically generated from dim_info.

    If the dimension is set to cyclic in the dim_info it will rotate
    the curve so that minimum y values are at the minimum x value to
    make the plots easier to interpret.
    Fzw
        Whether to let matplotlib automatically compute tick marks
        or to allow the user to control tick marks.defaultdoc)linearz	steps-midz	steps-prez
steps-postr7   z
        Defines how the samples of the Curve are interpolated,
        default is 'linear', other options include 'steps-mid',
        'steps-pre' and 'steps-post'.)objectsr5   r6   z}
        If plotted quantity is cyclic and center_cyclic is enabled,
        will compute tick labels relative to the center.r   皙?r5   class_z
        Enable axis grid.T-
        Whether to show legend for the plot.)alphacolorvisible	linewidth	linestylemarkermsplotsinglec                 B   t                      5  |                     |||          }d d d            n# 1 swxY w Y   d| j        v rt          || j                  }|                    d          }|                    d          }|                                }t          |          ra|                    d          }t          j	        
                    |d          }|d                             t          |                    |d<   | j        r||fn||f}	|	|d|ifS )Nsteps)interpolationr   r!   z%Y-%m-%d %H:%M:%Svalue_format
dimensions)r   _apply_transformsrJ   r   dimension_valuesrM   r   get_dimension_typer	   type_formattersgetcloner   invert_axes)
selfelementrangesstylexsysdimsdimtype	dt_formatcoordss
             r1   get_datazCurvePlot.get_dataO   sp   "$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C d((('t?QRRRG%%a((%%a((!!##b>> 	K0033G!155g?RSSI1gmmy1I1ImJJDG!-;"bB8u|T222   377c                     |\  }}t          |          r |j        ||dfi |d         }n |j        ||fi |d         }d|iS )N-r   artist)r   	plot_daterE   )rU   ax	plot_argsplot_kwargsrY   rZ   rc   s          r1   init_artistszCurvePlot.init_artists_   sh    Bb>> 	7!R\"b#====a@FFRWR33{33A6F&!!r0   c                     | j         d         }|                     |||          \  \  }}}}	|                    |           |                    |           |	S Nrc   )handlesr_   	set_xdata	set_ydata)
rU   keyaxisrV   rW   rX   rc   rY   rZ   axis_kwargss
             r1   update_handleszCurvePlot.update_handlesg   s\    h''+}}Wfe'L'L$R%r0   N)r+   r,   r-   r.   paramBooleanautotickObjectSelectorrJ   relative_labelsClassSelectorintfloattuplepadding	show_gridshow_legend
style_opts_nonvectorized_stylesdict_plot_methodsr_   rh   rq   r/   r0   r1   r3   r3   '   sI         u}U 17 8 8 8H )E( 2M 2M 2M19 @)* * *M $emE 8< = = =O "e!(C;NOOOGe 2   I  %- 30 1 1 1K YXXJ&D'''M3 3 3 " " "    r0   r3   c                   D    e Zd ZdZg dZ ed          Zd Zd Zd Z	dS )		ErrorPlotz
    ErrorPlot plots the ErrorBar Element type and supporting
    both horizontal and vertical error bars via the 'horizontal'
    plot option.
    )	edgecolor
elinewidthcapsizecapthick	barsabovelolimsuplimsxlolims
erroreveryxuplimsr>   rB   rA   markeredgecolormarkeredgewidthmarkerfacecolor
markersizesolid_capstylesolid_joinstyledashesr?   errorbarrF   c                      |j         |i |}d\  }}t          t          d          k    r|\  }}}	|r|\  }}n	|\  }\  }}}	|||	d         |	d         dS )N)NNz2.0r   )bottomstopsvertsrc   )r   r(   r   )
rU   re   	plot_datarg   rk   r   r   _capsr   s
             r1   rh   zErrorPlot.init_artists   sz    "+y8K88"'%..(($NAtU % $(/%A"D58uUVxXXXr0   c                    t                      5  |                     ||          }d d d            n# 1 swxY w Y   |                    dd           }t          |t          j                  r||d<   d|v r|                    d          |d<   d|v r<t	          j        |                    d                                                    |d<   |                    d          }t          |t          j                  r7t                      5  t          d| j
        j         d          # 1 swxY w Y   d	|d
<                                   }fdt          d          D             \  }}                    |dd                   }	j        | j        z  rdnd}
| j        r||fn||f}t#          |          dk    r|	j        n|	d d df         ||
<   ||i fS )Nr?   ecolorr   rA   r   czcMapping a continuous or categorical dimension to a color on a ErrorBarPlot is not supported by the O backend. To map a dimension to a color supply an explicit list of rgba colors.nonefmtc              3   B   K   | ]}                     |          V  d S NrO   .0irV   s     r1   	<genexpr>z%ErrorPlot.get_data.<locals>.<genexpr>   1      @@!'**1--@@@@@@r0   r      )rM   xerryerrr   r   )r   rN   pop
isinstancenpndarrayasarraytolistrR   
ValueErrorrendererbackendrM   rangearray
horizontalrT   lenT)rU   rV   rW   rX   r?   r   r[   rY   rZ   errerr_keyr^   s    `          r1   r_   zErrorPlot.get_data   sh   "$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C		'4((eRZ(( 	$#E(O%#ii44E(O%"$*UYY{-C-C"D"D"K"K"M"ME,IIcNNa$$ 	&((    "D<@M<Q"D "D "D           e!!##@@@@uQxx@@@BmmtAaCym11#.1AAM&&v!-;"bB8"%d))a--SAYgub  s   488D++D/2D/c                 ^   | j         d         }| j         d         }| j         d         }|                     ||          \  }	}}
fdt          d          D             \  }}}t                                                    dk    rdnd}                    |          }j        r||z
  |}}||z   |}}n|||z
  }}|||z   }}| j        r||}}||}}t          j	        t          j
        ||g||gg          dd          }|                    |           |r*|                    |           |                    |           |r*|                    |           |                    |           d|v r|                    |d                    d	|v r|                    |d	                    |
S )
Nr   r   r   c              3   B   K   | ]}                     |          V  d S r   r   r   s     r1   r   z+ErrorPlot.update_handles.<locals>.<genexpr>   s1      KKQW55a88KKKKKKr0   r   r   r   r   r   )rk   r_   r   r   rM   rO   r   rT   r   moveaxisr   	set_pathsrl   rm   set_edgecolorsset_linewidths)rU   rn   ro   rV   rW   rX   r   r   r   r   rp   rY   rZ   	neg_errorpos_idx	pos_errorbxsbystxstys
new_arrayss      `                 r1   rq   zErrorPlot.update_handles   s   ,y)|F#W% $gvu E E5+KKKK%((KKKB	7--//00144!!!,,W55	 	*I~rCI~rCC2	>C2	>C 	 CCCC[C:Sz*B!C!CQJJ

### 	#c"""c""" 	 NN3NN3u  x1115    |!4555r0   N)
r+   r,   r-   r.   r~   r   r   rh   r_   rq   r/   r0   r1   r   r   p   st         8 8 8J D
+++M	Y 	Y 	Y! ! !@    r0   r   c                       e Zd Z ej        deeef          Z ej	        dd          Z
g dZeZ ed          Zd	 Zd
 ZdS )AreaPlotr9   r;   Fr=   r4   )r?   	facecolorr>   r   rA   hatchrB   	joinstylefillcapstyleinterpolatestepfill_betweenrF   c                     t                      5  |                     ||          }d d d            n# 1 swxY w Y                       d          }fdj        D             }t	          |g|z             |i fS )Nr   c                 :    g | ]}                     |          S r/   r   )r   vdimrV   s     r1   
<listcomp>z%AreaPlot.get_data.<locals>.<listcomp>   s'    GGGg&&t,,GGGr0   )r   rN   rO   vdimsrz   rU   rV   rW   rX   rY   rZ   s    `    r1   r_   zAreaPlot.get_data   s    "$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C %%a((GGGGGGGbT"W~~ub((s   488c                 D    | j         r|j        n|j        } ||i |}d|iS rj   )rT   fill_betweenxr   )rU   re   r   rg   fill_fnstacks         r1   rh   zAreaPlot.init_artists   s8    &*&6K"""BO2k22%  r0   N)r+   r,   r-   rr   rw   rx   ry   rz   r{   rs   r}   r~   r   r   r   r_   rh   r/   r0   r1   r   r      s        !e!(C;NOOOG%- 40 1 1 1K= = =J 'D///M) ) )! ! ! ! !r0   r   c                       e Zd Z ej        dd          Z ej        dd          Z ej        dg dd	          Z	 ej        dg d
d	          Z
dS )SideAreaPlotr!   r!   r!   r   (
        Make plot background invisible.r4   r   I
        The size of the border expressed as a fraction of the main plot.baretopbottomr   ztop-barezbottom-bareN
        Whether and where to display the xaxis, bare options allow suppressing
        all axis labels including ticks and xlabel. Valid options are 'top',
        'bottom', 'bare', 'top-bare' and 'bottom-bare'.r5   r8   r6   leftrightr   z	left-barez
right-bareN
        Whether and where to display the yaxis, bare options allow suppressing
        all axis labels including ticks and ylabel. Valid options are 'left',
        'right', 'bare' 'left-bare' and 'right-bare'.N)r+   r,   r-   rr   	ParameterbgcolorNumberborder_sizeru   xaxisyaxisr/   r0   r1   r   r      s        eol 9+ , , ,G %,q /L M M MK !E *? *? *?E;< < <E !E *> *> *>D9: : :EEEr0   r   c                   ~     e Zd ZdZ ej        deeef          Z	 ej
        dd          Z fdZd Zdd
Z xZS )
SpreadPlotz3
    SpreadPlot plots the Spread Element type.
    r9   r;   Fr=   r4   c                 <     t                      j        |fi | d S r   )super__init__)rU   rV   params	__class__s      r1   r   zSpreadPlot.__init__  s(    ++F+++++r0   c                    t                      5  |                     |||          }d d d            n# 1 swxY w Y   |                    d          }|                    d          }|                    d          }t          |                                          dk    rdnd}|                    |          }|||z
  ||z   f|i fS )Nr   r!   r   r   )r   rN   rO   r   rM   )	rU   rV   rW   rX   rY   meanr   r   r   s	            r1   r_   zSpreadPlot.get_data  s   "$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C%%a((''**,,Q//	7--//00144!!!,,W55	DNDN3UB>>r`   combinedc                 <    t                               | |||          S r   )r*   get_extents)rU   rV   rW   
range_typekwargss        r1   r   zSpreadPlot.get_extents  s    $$T7FJGGGr0   r   )r+   r,   r-   r.   rr   rw   rx   ry   rz   r{   rs   r}   r   r_   r   __classcell__r   s   @r1   r   r     s          "e!(C;NOOOG%- 40 1 1 1K, , , , ,? ? ?H H H H H H H Hr0   r   c                   z     e Zd ZdZg dZg dZ fdZedd            Zd Z	d Z
d fd
	Zd Zd Zd Zd Z xZS )HistogramPlotz
    HistogramPlot can plot DataHistograms and ViewMaps of
    DataHistograms, which can be displayed as a single frame or
    animation.
    )r>   r?   alignr@   r   r   logr   error_kwr   rA   )r>   r	  r
  r   r@   r  c                     d| _         d| _         t                      j        |fi | | j        r
g d| _        n	g d| _        | j        j                            d          }|j        r|j	        nd | _
        d S )NF)ylabelxlabelyticks)r  r  xticksr!   )centercyclicr   r   rT   axis_settingshmaplastget_dimensionr   cyclic_range)rU   
histogramsr   val_dimr   s       r1   r   zHistogramPlot.__init__,  s    ..v... 	@!?!?!?D!?!?!?D)...q11-4^EGMMr0   Nc                    | j         j        }| j        d         }|                     | j         ||          }t	          ||          }|                                d d         }|                     |          \  }}}}	}
|
rU|d         j        sHt          j	        t          j                 }|d                             t          |                    |d<   | j        | j                 }| j        r/| j        d         j        | _        | j        d         j        | _        n.| j        d         j        | _        | j        d         j        | _        t1                      5  |                     |||          }d|v rt5          d| j        j         d          	 d d d            n# 1 swxY w Y   | j        r|j        nd	} | j        |||f| j        |d
d|}|                      | j        d         |||	|          | j        d<   | !                    ||||	          }| "                    ||	|          }||d<    | j#        | j        d         f||d|S )Nr   r   rK   ro   vminzUMapping a continuous dimension to a color on a HistogramPlot is not supported by the r    edge)zorderlabelr  rc   rM   )rW   rV   )$r  r  keyscompute_rangesr   rM   _process_histrL   r	   rQ   r   
datetime64rS   r   rX   cyclic_indexrT   rk   axvlineoffset_linefnbarhplotfnaxhlinebarr   rN   r   r   r   r}   r  r  _update_plot_compute_ticks_process_axsettings_finalize_axis)rU   rW   histrn   	el_rangesr[   edgeshvalswidthslimsis_datetimer]   rX   legendbarsticksax_settingss                    r1   initialize_plotzHistogramPlot.initialize_plot:  s   y~im$$TYV<<tV,,	   !$262D2DT2J2J/ufdK 	KtAw3 	K!1"-@I1gmmy1I1ImJJDG
4,- 	3!%f!5!=D,v.3DKK!%f!5!=D,v.2DK"$$ 	 	**4??E  "D59]5J"D "D "D    	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  $/7Rt{5%i6Y_iichii!%!2!249R=$dTZ![![X##D%>>..tT5AA$(L!"t"49R=`D``T_```s   9FF"%F"c                 4   |                     d          j        | _        |j        d         }|j                            ||d          }|                    d          }t          j        |          }|                    d          }|                    d          }t          |          }|rFt          j        d |D                       }t          |          }t          d |D                       }t          j        |          }	|dd         ||	||z   |fS )	zK
        Get data from histogram, including bin_ranges and values.
        r   T)r1  r!   c                 d    g | ]-}t          |t          j                  rt          |          n|.S r/   )r   r   r#  r   )r   es     r1   r   z/HistogramPlot._process_hist.<locals>.<listcomp>t  s5    bbbWXz!R]/K/KRjmmmQRbbbr0   c              3   6   K   | ]}t          |d           V  dS )DN)r   )r   vs     r1   r   z.HistogramPlot._process_hist.<locals>.<genexpr>v  s,      99q1c**999999r0   Nr  )r  r  kdims	interfacer^   rO   r   r   r   r   r   rz   diff)
rU   r/  xr1  values	hist_valsxlimylimr5  r3  s
             r1   r"  zHistogramPlot._process_histg  s    ((++2JqM%%dAT%::&&q))HV$$	zz!}}zz!}} '' 	:Hbb\abbbccEUOOE99D99999DSbSz9fd4iDDr0   c                    | j         t          | j         t                    sdS | j        r/|\  }}}}t	          j        ||| j                   }d |D             }	n| j         r|                    d          t	          j        dt                    | j         t                    }
t                    d         |d         z   gz   fd|
D             }fd|D             }	||	gS )zw
        Compute the ticks either as cyclic values in degrees or as roughly
        evenly spaced bin centers.
        Nc                 >    g | ]}t          j        |          d dS )z.0f   °)r   rad2deg)r   rD  s     r1   r   z0HistogramPlot._compute_ticks.<locals>.<listcomp>  s,    KKKA;;;;KKKr0   r   )dtyper  c                      g | ]
}|         S r/   r/   )r   r   r1  s     r1   r   z0HistogramPlot._compute_ticks.<locals>.<listcomp>  s    ,,,!U1X,,,r0   c                 0    g | ]} j         |          S r/   )pprint_value)r   r@  r   s     r1   r   z0HistogramPlot._compute_ticks.<locals>.<listcomp>  s'    999a&c&q))999r0   )	r  r   rx   r  r   linspacer  r   list)rU   rV   r1  r3  r4  x0x1r   xvalslabelsindsr   s     `        @r1   r,  zHistogramPlot._compute_ticksz  s    
 ;jc&B&B4; 		:LBAqKB44EKKUKKKFF[ 	:''**C;q#e**dkEEEDKK59vbz#9"::E,,,,t,,,E99995999Fvr0   r   c                 H   |                     d          }||j                 d         \  }}t          |          rt          |d          nd}t          |          rt	          |d          nd}||f||j                 d<   t                                          |||          S )Nr!   softr   )r  namer   minmaxr   r   )	rU   rV   rW   r  r  ydims0s1r   s	           r1   r   zHistogramPlot.get_extents  s    $$Q''	"6*B#B<<.SQZZZQ#B<<.SQZZZQ%'Hty&!ww""7FJ???r0   c                 b    t          t          | j        dd| j        rdn|g                    }|S )z`
        Get axis settings options including ticks, x- and y-labels
        and limits.
        N)r   zipr  overlaid)rU   r/  r4  r8  r  s        r1   r-  z!HistogramPlot._process_axsettings  s7    
 S!3dD4=Cc44^c5effggr0   c                     |S )ze
        Process bars can be subclassed to manually adjust bars
        after being plotted.
        r/   )rU   rn   r/  r7  r4  rW   s         r1   r+  zHistogramPlot._update_plot  s	    
 r0   c                 `   t          | j        d         |||          }|D ]\  }	}
}}| j        r@|	                    |
           |	                    |           |	                    |           N|	                    |
           |	                    |           |	                    |           dS )zu
        Update all the artists in the histogram. Subclassable to
        allow updating of further artists.
        rc   N)ra  rk   rT   set_y	set_width
set_heightset_x)rU   rn   r/  r1  r2  r3  r4  rW   	plot_valsr*  r  heightwidths                r1   _update_artistszHistogramPlot._update_artists  s    
 X.ufEE	(1 	% 	%$Cvu %		$f%%%u%%%%		$v&&&e$$$$	% 	%r0   c           	          |                      |          \  }}}}	}
|                     ||||	          }|                     ||	|          }|                     ||||||	|           |S r   )r"  r,  r-  rl  )rU   rn   ro   rV   rW   rX   r1  r2  r3  r4  r   r8  r9  s                r1   rq   zHistogramPlot.update_handles  sv    (,(:(:7(C(C%ufdA##GUFDAA..weDDS'5%vNNNr0   r   r  )r+   r,   r-   r.   r~   r   r   r'   r:  r"  r,  r   r-  r+  rl  rq   r  r  s   @r1   r  r    s          J VUUF F F F F )a )a )a ^)aXE E E&  &@ @ @ @ @ @    % % %"      r0   r  c                        e Zd Z ej        dd          Z ej        ddd          Z ej        dd	          Z	 fd
Z
 fdZd Zd Zd Z xZS )SideHistogramPlotr   r   r4   皙?r   r!   z/
        Histogram value offset for a colorbar.r5   boundsr6   Fz/
        Whether to overlay a grid on the axis.c                     t                                          |          \  }}}}}| j        |d         z  }|d| j        z
  z  }||z  }|dd         |d         |z   fz   }|||||fS )zC
        Subclassed to offset histogram by defined amount.
        r   r!   r   )r   r"  offset)	rU   r/  r1  r2  r3  r4  r   ru  r   s	           r1   r"  zSideHistogramPlot._process_hist  s     271F1Ft1L1L.ufdJtAw&4;'AaCyDGf,..eVT:55r0   c           	          t                                          |||||||           |                     ||| j        d         ||           d S rj   )r   rl  r+  rk   )	rU   nrV   r1  r2  r3  r4  rW   r   s	           r1   rl  z!SideHistogramPlot._update_artists  sP    7E5&$OOO!Wdl8&<dFKKKKKr0   c                 N   | j         j        }|                    d          \  }}| j        |z  }	t	          | |||          \  }
}}t
          j        d                             t          |
                    }t          |t                    r|                    |
          }|                     |
d          }|rt          |t                    rn|j                            dd          }|7|                     |
d          }|j                            dd          }||
vrd}|dn|
                    |          }nd}t          |
t$          t&          f          s|rc||v r_|                     |
d          | j                 }t+          j        |                    d                    }|                    d	|          }nd}|	r*d
| j        vr!|                     |	dd          | j        d
<   n|	r|                     |	           ||rd|vr|                     |||||           |S )z
        Process the bars and draw the offset line as necessary. If a
        color map is set in the style of the 'main' ViewableElement object, color
        the bars appropriately, respecting the required normalization
        settings.
        r!   
matplotlibrE   color_indexNrX   r?   cmapclimsoffset_line      ?k)rA   r?   )adjoinedmainr   ru  r    r   registryrR   typer   r   get_plot_classlookup_options
issubclassr"   optionsr  r  r   r   r$  r   get_cmaprk   r&  _update_separator_colorize_bars)rU   rn   rV   r7  r4  rW   r  r   y1ru  
range_item
main_ranger   	plot_typeoptscidxcdimrX   r{  s                      r1   r+  zSideHistogramPlot._update_plot  sH    }!a  2r!&9$v&V&V#
J N<044T*5E5EFF	i.. 	=!00<<I"":v66 		I|<< 		<##M488D|**:w??{w55z))D<44Z-E-Ed-K-KDDD j7F"344 	 	$'//''
G<<T=NOE;uyy0011D7J77JJD 	+}DL88*.*<*<VGJCF += +H +HDL''  	+""6***
J0F0FdGZEEEr0   c                 (   |d         |d         z
  }|d         }t          j        |                    |                    }||z
  |z  }t          ||          D ]8\  }	}
|
                     ||	                     |
                    d           9dS )zo
        Use the given cmap to color the bars, applying the correct
        color ranges as necessary.
        r!   r   FN)r   r   rO   ra  set_facecolorset_clip_on)rU   r{  r7  rV   r  r   
cmap_rangelower_boundcolorsr   r*  s              r1   r  z SideHistogramPlot._colorize_bars  s    
  ]Z]2
 m'2237788;&:6&$'' 	# 	#FAsdd1gg&&&OOE""""	# 	#r0   c                     | j         d         }|dk    r|                    d           dS |                    d           | j        r|                    |           dS |                    |           dS )z_
        Compute colorbar offset and update separator line
        if map is non-zero.
        r}  r   FTN)rk   set_visiblerT   rl   rm   )rU   ru  r}  s      r1   r  z#SideHistogramPlot._update_separator  s    
 l=1Q;;##E*****##D))) .%%f-----%%f-----r0   )r+   r,   r-   rr   r   r   r   ru  rs   r|   r"  rl  r+  r  r  r  r  s   @r1   ro  ro    s        eol 9+ , , ,G U\#e :2 3 3 3F e 22 3 3 3I	6 	6 	6 	6 	6L L L L L- - -^# # #. . . . . . .r0   ro  c                   L   e Zd ZdZ ej        dd          Z ej        dee	fdd          Z
 ej        dee	fdd	          Z ej        d
dd
gd          Z ej        ddd          Z ej        ej        d          Zg dZg dZdgZ ed          Zd Zd Zd ZdS )	PointPlotz
    Note that the 'cmap', 'vmin' and 'vmax' style arguments control
    how point magnitudes are rendered to different colors.
    Fz8
      Whether to draw grid lines at the tick positions.r4   NTzN
        Deprecated in favor of color style mapping, e.g. `color=dim('color')`r5   r<   
allow_Noner6   zK
        Deprecated in favor of size style mapping, e.g. `size=dim('size')`areark  zU
        Deprecated in favor of size style mapping, e.g.
        size=dim('size')**2.r   r!   )r   Nz
      Scaling factor which is applied to either the width or area
      of each point, depending on the value of `scaling_method`.rr  zg
      Function applied to size values before applying scaling,
      to remove values lower than zero.)r>   r?   
edgecolors
facecolorsrA   rC   sizer@   r{  r  vmaxnorm)r>   rC   r{  r  r  r  r@   r  scatterrF   c                    fdt          d          D             \  }}|                     ||           t                      5  |                     ||          }d d d            n# 1 swxY w Y   | j        r||fn||f|i fS )Nc              3   B   K   | ]}                     |          V  d S r   r   r   s     r1   r   z%PointPlot.get_data.<locals>.<genexpr>Q  r   r0   r   )r   _compute_stylesr   rN   rT   r   s    `    r1   r_   zPointPlot.get_dataP  s    @@@@uQxx@@@BWfe444"$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C+9Bxx"b5"DDs   A))A-0A-c                    |                     | j                  }|                    dd           }|                    dd           }|rJt	          |t
                    r||v st	          |t                    r| j                            d           d }|ri|rg|	                    | j                  }|j
        j        dv r||d<   n t          |t          |                    |d<   |                     ||||           n|||d<   |                    d|                    dd                    |d<   |                    d	t          j        d
                   }|                     | j                  }	|	rJt	          |t
                    r||v st	          |t                    r| j                            d           d }	|	r}|	                    | j                  }
t%          |
| j        | j        | j        |          }
|
:t-          |          j        }| j                            |	j         d| d           n|
|d	<   |                    dd          |d<   d S )Nr?   r{  dCannot declare style mapping for 'color' option and declare a color_index; ignoring the color_index.uifr   r  r   r   szlines.markersizez^Cannot declare style mapping for 's' option and declare a size_index; ignoring the size_index.z/ dimension is not numeric, cannot use to scale z size.)r  rz  r   rR   r   strr   rr   warningrO   rM  kindr   r   _norm_kwargsmplrcParams
size_indexr   size_fnscaling_factorscaling_methodr  r+   pprint_label)rU   rV   rW   rX   r  r?   r{  csrD   sdimsizeseltypes               r1   r  zPointPlot._compute_stylesX  s   $$T%566		'4((yy&& 	j,, 	'1A1AjQVX[F\F\1AJCD D D D 		#D 		#))$*:;;Bx}%%c

+BR0@0@AAc
gvud;;;;"E'N#iieiiV6T6TUUlYYsCL);<==$$T_55 	jS)) 	bGmm
2s@S@SmJAB B B D 
	#,,T_==E!%t7J"&"5r; ;E}g/
""( , ,#, , ,- - - - #c
#iif==lr0   c                    | j         d         }|                     |||          \  \  }}}}	|                                d d         \  }
}d|                    |
j        i           v r.t          ||
j                 d                   fd|D             }d|                    |j        i           v r.t          ||j                 d                   fd|D             }|                    t          j        ||g                     d|v r/|d         }t          |          r|g}|
                    |           d|v r#|                    |d         |d         f           d	|v r|                    |d	                    d
|v r|d
         |_        d|v r|                    |d                    d|v r|                    |d                    d|v r|                    |d                    d S d S )Nrc   r   factorsc                 B    g | ]}|v                      |          S r/   index)r   rD  r  s     r1   r   z,PointPlot.update_handles.<locals>.<listcomp>  *    ???q!w,,'--"",,,r0   c                 B    g | ]}|v                      |          S r/   r  )r   yr  s     r1   r   z,PointPlot.update_handles.<locals>.<listcomp>  r  r0   r  r  r  r   r  rA   r  r  )rk   r_   rM   rR   rZ  rR  set_offsetsr   column_stackr   	set_sizesset_clim	set_arrayr  r   r   )rU   rn   ro   rV   rW   rX   pathsrY   rZ   r   xdimr]  r  r  s                @r1   rq   zPointPlot.update_handles  s   X&!]]7FEBBR%''))"1"-
d

49b11116$),Y788G????B???B

49b11116$),Y788G????B???B"/2r(33444%<<#JE  OOE"""U??NNE&M5=9:::%<<OOE#J'''U??vEJ%  {!34445    |!45555    |!455555 ! r0   )r+   r,   r-   r.   rr   rs   r|   rw   r  rx   rz  r  ru   r  r   r  Callabler   absr  r~   r   _disabled_optsr   r   r_   r  rq   r/   r0   r1   r  r  %  s        
 e 2; < < <I
 &%%dC:15 <QR R RK %$T3*04 ;NO O OJ *U)&3:F2C/ ! ! !N "U\!I DD E E EN enRV 2+ , , ,G2 2 2J) ) ) XND	***ME E E(> (> (>V6 6 6 6 6r0   r  c                   b   e Zd ZdZ ej        dd          Z ej        ee	fd          Z
 ej        deeef          Z ej        dd	          Z ej        d
eefdd          Z ej        d
eefdd          Z ej        dd          Zg dZg dZ ed          Zd Zd Zd Zd
S )VectorFieldPlota  
    Renders vector fields in sheet coordinates. The vectors are
    expressed in polar coordinates and may be displayed according to
    angle alone (with some common, arbitrary arrow length) or may be
    true polar vectors.

    The color or magnitude can be mapped onto any dimension using the
    color_index and size_index.

    The length of the arrows is controlled by the 'scale' style
    option. The scaling of the arrows may also be controlled via the
    normalize_lengths and rescale_lengths plot option, which will
    normalize the lengths to a maximum of 1 and scale them according
    to the minimum distance respectively.
    Tz
       Whether or not to draw arrow heads. If arrowheads are enabled,
       they may be customized with the 'headlength' and
       'headaxislength' style options.r4   a:  
        Dimension or dimension value transform that declares the magnitude
        of each vector. Magnitude is expected to be scaled between 0-1,
        by default the magnitudes are rescaled relative to the minimum
        distance between vectors, this can be disabled with the
        rescale_lengths option.)r<   r6   g?r;   z|
       Whether the lengths will be rescaled to take into account the
       smallest non-zero distance between two vectors.Nzz
        Deprecated in favor of dimension value transform on color option,
        e.g. `color=dim('Magnitude')`.
        r  zi
        Deprecated in favor of the magnitude option, e.g.
        `magnitude=dim('Magnitude')`.
        z
        Deprecated in favor of rescaling length using dimension value
        transforms using the magnitude option, e.g.
        `dim('Magnitude').norm()`.)r>   r?   r  r  rA   rC   r@   r{  scale
headlengthheadaxislengthpivotrk  	headwidthr  )	r>   rC   r{  r@   r  r  r  r  r  quiverrF   c                    |                     | j                  }| j        }|r|r| j                            d           n/|r|}n*t          |t                    r|                     |          }|st          |t                    r|                    |d          }ng|	                    |          }|t          |                   d         \  }}| j        r|dk    r||z  }n!t          j        t          |                    }|S )NzfCannot declare style mapping for 'magnitude' option and declare a size_index; ignoring the size_index.T)flatr   r   )r  r  	magnituderr   r  r   r  r   applyrO   r
   normalize_lengthsr   onesr   )	rU   rV   rX   rW   size_dimmag_dim
magnitudesr   max_magnitudes	            r1   _get_magnitudeszVectorFieldPlot._get_magnitudes  s%   ((99. 	5 	5JEF F F F  	5GG%% 	5++G44G'3'' <$]]7]>>

$55g>>
#).*A*A#B:#N =) <mq.@.@!+m!;JW..Jr0   c                    | j         rdnd\  }}t          |j                  r|                    |          ng }t          |j                  r|                    |          ng }t          |j                  r|                    d          ng }| j         r|dt          j        z  z   }t          t	          j        |                    }	|                     |||          }
|	                    dd          }| j
        rt          |          }||z  }|||
dgt          |          z  f}|                    | j                  }|                    dd           }|rJt          |t                     r||v st          |t"                    r| j                            d	           d }|rg|                    | j                  }||d
<   |                    | j                  }|                     ||||           |	                    dd            t+                      5  |                     |||          }d d d            n# 1 swxY w Y   |                    t1          ||	dd                     d|v r-|	                    d          |	                    d          f|d<   d
|v r|	                    d
          |d<   d|vrd|d<   | j        sd|d<   ||i fS )N)r!   r   rq  r   g      ?r  r~          r?   r  r   rD  )r  anglesunitsscale_unitsr  r  climr   r  midr   r  )rT   r   datarO   r   pirR  rL  r  r   rescale_lengthsr   r  rz  rR   r   r  r   rr   r  r  r   rN   updater   arrow_heads)rU   rV   rW   rX   xidxyidxrY   rZ   radiansr  r  input_scalemin_distargsr  r?   r  s                    r1   r_   zVectorFieldPlot.get_data  sH   #/;VVV
d/27</@/@HW%%d+++b/27</@/@HW%%d+++b 25W\1B1BJ'**1---8ws25y'8Wbj))**))'5&AA
ii-- 	1'00H%0KB
cUS\\%9: $$T%566		'4(( 	j,, 	'1A1AjQVX[F\F\1AJCD D D D 	%--d.>??FE#J(()9::Dgvud;;;IIgt$$$ #$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	CTF#SVWWWXXXU??"YYv..		&0A0ABE&M%<<"YYs^^E'N%"E'N 	(&'E"#UBs   I  IIc                    |                      |||          \  }}}| j        d         }|                    t          j        |d d                              |d         |_        |d         |_        d|v r6|                    |d                    |                    |d                    d|v r|	                    |d                    d|v r|
                    |d                    d|v r|                    |d                    |S )Nrc   r   r  r?   r   r  rA   )r_   rk   r  r   r  Ur  set_facecolorsr   r  r  r   )	rU   rn   ro   rV   rW   rX   r  rp   r  s	            r1   rq   zVectorFieldPlot.update_handles*  s   #'==&%#H#H e[ h'2?48445557he!!%.111!!%.111eU7^,,,U??OOE&M***%!!%"4555r0   )r+   r,   r-   r.   rr   rs   r  rw   r  r   r  rx   ry   rz   r{   r  rz  r  r  r~   r   r   r   r  r_   rq   r/   r0   r1   r  r    s           %- 3* + + +K
 $#C: <# $ $ $I "e!$UE7JKKKG#emD 7: ; ; ;O &%%dC:15 <  K %$T3*04 ;  J &d 9& ' ' '
0 0 0J
* * * D)))M  .. . .`    r0   r  c                   >    e Zd Z ej        dd          Z ej        dd          Z ej        dd          Z ej        dd          Z	g d	Z
d
gZ eej         eddddd           eddddd                    Zd Zedd            Z fdZd Z xZS )BarPlotrp  z+
       Defines the padding between groups.r4   TzP
       Whether the Bars should be grouped into a second categorical axis level.Fz6
       Whether the bars should be stacked or grouped.r=   )
r>   r?   r  r@   r   r	  r   r   r
  r   r@   )r  gRQ?r~  &1?r   expandr  )bbox_to_anchorncollocmodeborderaxespad)r  gٿr~  r  r   r:   )r   r   c                    |                      ||d          \  }}|j        }|j        dk    r|ddgz   }|dgd}n| j        r|d         }|d         d|g}|j        r|j        }	nI||v r/||j                                     d          r||         d         }	n|                    dd          }	t          |	          }	||	d}n|dgz   }||d}||fS )	z5
        Get unique index value for each bar
        F)	as_stringr!   N)groupr   r   r  )r   category)	_get_coordsrA  ndimsstackedrE  rZ  rR   rO   rR  )
rU   rV   rW   gvalscvalsrA  rM   rE  	stack_dimstack_orders
             r1   _get_valueszBarPlot._get_values^  s    ''5'IIu=A$-J$v66FF\ 	9aI(D)4J A'.f$$	)?)C)CI)N)N$$Y/	:%66q%@@{++K${;;FF$J$%88F6!!r0   Nc                    | j         j        }|j        d         }| j        d         }| j        d         }t          d	d| j        i| j        | j                 }| 	                    | j         ||          }t          ||          }|                     ||||          \  | j        d<   }}| j        rd|ind|i}	 | j        |f||||gd|	S )
Nr   ro   r  r  rc   r  r  )rW   rV   rM   r/   )r  r  r   rk   r   r   r  rX   r$  r!  r   _create_barsrT   r.  )
rU   rW   rV   r   ro   rn   rX   r  xdimsr  s
             r1   r:  zBarPlot.initialize_plotx  s    ).}Q|F#imIIDKI4:d6G+HII$$TYV<<GV,,040A0A$QWY^0_0_-X'+'7O(F##h=O"t"3 Gvw/4dmG G?EG G 	Gr0   c                    d}|p|}|;t          t          |d            \  }}}t          |          t          |          f}|r|}n|r|}t                                          |||||           |r|r?t          |                                |          D ]\  }	}
|	                    |
           dS |r?t          |                                |          D ]\  }	}|	                    |           dS dS dS )z7
        Apply ticks with appropriate offsets.
        Nc                     | d         S )Nr   r/   )rD  s    r1   <lambda>z)BarPlot._finalize_ticks.<locals>.<lambda>  s
    1 r0   )rn   )	ra  sortedrR  r   _finalize_ticksget_xticklabelsre  get_yticklabelsrh  )rU   ro   rV   r  r  zticks
alignmentsr8  rV  tr  rD  r   s               r1   r  zBarPlot._finalize_ticks  s@    
 &(+VE~~-N-N-N(O%E6:%[[$v,,/E 	FF 	FgvvvFFF 	  4 4 6 6
CC  DAqGGAJJJJ   4 4 6 6
CC  DAqGGAJJJJ	 	  r0   c                    )*                       ||          \  \  }}}}d *|r|d         }	|*n|r
|d         }	|**r *fdt          |	          D             }
nd i i}
dd j        z  z
  t          |                    dd g                    z  } j        r
d)d\  }}}}n	d)d	\  }}}}g g i }}}t          |                    d
d g                    D ]\  }}i }d }|H|                    |          }|g||j        <   |r	 j        rdnd}|	                    |dz   ||f           t          |                    dd g                    D ]\  }}| j        z   ||z  z   }|E|                    |          }|g||j        <    j        r|	                    ||dz  z   |df           d}|                    dd g          D ]}| |                    |          }|g||j        <    |j
        di |}|                    |j        d         j                  }t          |          rt          |d                   nt          j        } ||dz  z   }!||v rZ||         }"|"|         	                    |!           |"|         	                    |            |"|         	                    |           nt!          |fi |
                    |i           }#t#                      5                       |||#          }#d d d            n# 1 swxY w Y   ||!g|| g||||gd|i||<   ||                             |#           |t)          |           r| ndz  }||	                    |           )fd|                                D             }$|g}%d}&|r|j        }&|%	                    |           n%|r#|j        }& j        r|%	                    |            j        rzt1          d |D                       ra|s j        sX j         j                 }' j        r
 j        |'d<    j                                        }( |(j        di |'  j        dd|&i|( |$||%fS )Nr   r  c                 X    i | ]&\  }}                     |          j        |         'S r/   )rP  rX   )r   r   r@  rU   	style_dims      r1   
<dictcomp>z(BarPlot._create_bars.<locals>.<dictcomp>  sC     6 6 6!Q #//22DJqM 6 6 6r0   r!   g       @r'  )r  rk  rj  r   r*  )rD  rj  rk  r   r   g{Gzr   g      ?r  c                 <    g | ]} t                    d i |S )r/   )getattr)r   bar_specro   plot_fns     r1   r   z(BarPlot._create_bars.<locals>.<listcomp>  s4    UUUx&g&&2222UUUr0   r  c              3   4   K   | ]}t          |          V  d S r   )r   )r   ls     r1   r   z'BarPlot._create_bars.<locals>.<genexpr>  s(      #;#;qCFF#;#;#;#;#;#;r0   r  titler/   )r	  	enumeratebar_paddingr   rR   rT   rP  rZ  multi_levelappendselectrO   r   ry   r   nanr   r   rN   r  r   rE  r  r}   anylegend_specslegend_positionlegend_colslegend_optscopyr6  )+rU   ro   rV   rW   rX   gdimr  r  rE  cats	style_maprk  rD  r  wr   r  rV  bar_datagidxgrpsel_keyr  	grp_labelyalignr  catxposprevstkelvalsvalxvalr   	bar_styler7  ax_dimsr!  leg_specr,  r  r  s+   ``                                       @@r1   r  zBarPlot._create_bars  s   %)%5%5gv%F%F"tTF	 	'?DII 	*%DI 	#6 6 6 6 6%.t__6 6 6II r
I Bt''(C

:v0N0N,O,OO 	?G<OAq!VVG>OAq!V $&r2"6::gv#>#>?? (	- (	-ID#GE --c22	&)U	""&B4+;BtCxF;<<<&vzz*tf'E'EFF  -  -	cD,,d5j9? --c22E*-GDI&' AtE"H}eQ&?@@@!::gv66 - -C $ 1 1# 6 6.1U	*'22'22B..w}Q/?/DEED,/IIA%Q...26Cb=D(( (a---a,,,f,,T2222$($K$K)--r2J2J$K$K	244 V V(,(>(>r69(U(UIV V V V V V V V V V V V V V V tfa#5&4&#U+ !..y9998C==7CCa7D(e,,,1- -F VUUUU8??CTCTUUU & 	%%ENN4     	%%E %t$$$ 	4#;#;F#;#;#; ; ; 	4 	4TM] 	4()=>HDD4D&!1*//11KK*****DK33e3{333VW$$s    L	LLr   )r+   r,   r-   rr   r   r#  rs   r$  r  r}   r~   r   r   r$   r)  r	  r'   r:  r  r  r  r  s   @r1   r  r  ?  s       %,s 1. / / /K  %- 3S T T TK emE 09 : : :G  %- 30 1 1 1KF F FJ 'K4D/
 
 
 t/
 
 

 
 
L" " "4 G G G ^G    ,[% [% [% [% [% [% [%r0   r  c                       e Zd Z ej        dd          Z ej        ddeefd          Z	 ej
        dd	          Z ej        d
eeef          Z ej
        dd          Zej        dgz   Zd Zd Zd ZdS )
SpikesPlotsquarez
        The aspect ratio mode of the plot. Allows setting an
        explicit aspect ratio as width/height as well as
        'square' and 'equal' options.r4   NTzA
      Index of the dimension from which the color will the drawn)r5   r  r<   r6   r:   D
      The length of each spike if Spikes object is one dimensional.r9   r;   r  z3
      The position of the lower end of each spike.r{  c                    d|v r|                     d          |d<   d|v r1d|v r-|                     d          |                     d          f|d<   d|vrd|v r|d= t          |i |}|                    |           d|iS )Nr   r   r  r  r  r{  rc   )r   r   add_collection)rU   re   rf   rg   line_segmentss        r1   rh   zSpikesPlot.init_artists  s    +#.??3#7#7K [  V{%:%:"-//&"9"9;??6;R;R"RK+%%&K*?*?F#&	A[AA
-(((-((r0   c                 ,   |                     d          }t          |          }|                     |d          j        }| j        |dk    rTd|vrP|                    ddg          }||d                  ||d                  }	}fdt          ||	          D             }n,|                    dg          }| j        fd|D             }| j	        rd	 |D             }|                                 }
g }|D ]}t          | \  }}	g }t          ||	f          D ]\  }}t          j        |          }t          |          rt          j                            t!          |d                   t          j        t          j                           }t%          |          }|
|                             t)          |          
          |
|<   |                    |           |                    t          j        |                     |                    | j                  }|                    dd           }|rJt3          |t4                    r||v st3          |t6                    r| j                            d           d }|r0|                    |          |d<   |                     ||||           d|v r|                                 d         d f}nvt          |                                           dk    r|                                 d         d f}n4|                                 d         |                                 d         f}tA                      5  | !                    |||          }d d d            n# 1 swxY w Y   |f|d|ifS )NT)r  rE   r!   spike_lengthr   c                 ,    g | ]\  }}|f||z   fgS r/   r/   )r   rD  r  poss      r1   r   z'SpikesPlot.get_data.<locals>.<listcomp>&  s.    CCCtq!aX3q5z*CCCr0   c                 >    g | ]}|d          f|d          z   fgS )r   r/   )r   rD  rj  rM  s     r1   r   z'SpikesPlot.get_data.<locals>.<listcomp>*  s3    BBB!adC[1Q4V"45BBBr0   c                 R    g | ]$}|d          ddd         |d         ddd         f%S )r   Nr  r!   r/   )r   lines     r1   r   z'SpikesPlot.get_data.<locals>.<listcomp>-  s9    DDDtT!WTTrT]DGDDbDM2DDDr0   rK   r?   r  r   rM   )"rM   r   r  r  positioncolumnsra  r   rK  rT   r"  r   r   r	   rQ   rR   r  r#  r   rS   r   r%  r  r  rz  r   r  r   rr   r  rO   r  r   rN   )rU   rV   rW   rX   rM   r  r  r  rY   rZ   r[   clean_spikesspikecolsr   vsr]   r  r?   	axis_dimsrj  rM  s                       @@r1   r_   zSpikesPlot.get_data  s   ''d'33
J""7F33;m199t33??Aq6**D*Q-($z!}*=BCCCCs2r{{CCCDDs##B&FBBBBBrBBBD 	EDDtDDDD!!## 	7 	7E%[FBD"B8,, 	  	 2Xb\\b>> S ) 9 = =RU!1"-@! !I ""B"1gmmy9Q9QmRRDGB 5 56666$$T%566		'4(( 	j,, 	'1A1AjQVX[F\F\1AJCD D D D 	<$55d;;E'Ngvud;;;T!!!,,..q148II##%%&&!++!,,..q148II!,,..q173E3E3G3G3JKI"$$ 	C 	C**7FEBBE	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C 	C i'@@@s   NN
Nc                 J   | j         d         }|                     |||          \  \  }}}	|                    |           |                    |                    dd                     d|v r|                    |d                    d|v sd|v r<|                    |                    d|                    d                               d|v r#|                    |d         |d         f           d	|v r|d	         |_        d
|v r|	                    |d
                    |	S )Nrc   r@   Tr?   r   r   r  r  r  rA   )
rk   r_   r   r  rR   r   r  r  r  r   )
rU   rn   ro   rV   rW   rX   rc   r  r  rp   s
             r1   rq   zSpikesPlot.update_handlesW  s.   h''+}}Wfe'L'L$599Y55666f!!&/222fvVZZCAABBBVOOVF^VF^<===V .FK&  !!&"5666r0   )r+   r,   r-   rr   r   aspectrw   r  rx   rz  r   rK  ry   rz   r{   rQ  r%   r~   rh   r_   rq   r/   r0   r1   rD  rD    s       U_X 4) * * *F
 &%%dt.13Z >DE E EK  5< 2G H H HL "e!(C;NOOOGu|B -6 7 7 7H $x/J	) 	) 	)7A 7A 7At    r0   rD  c                       e Zd Z ej        dd          Z ej        dd          Z ej        dd          Z ej        dd	          Z	 ej
        d
g dd          Z ej
        d
g dd          ZdS )SideSpikesPlotr   r   r4   r   r   r:   zG
        The size subplots as expressed as a fraction of the main plot.r!   rF  r   r   r   r   r   r   N)r+   r,   r-   rr   r   r   r   r   subplot_sizerK  ru   r   r   r/   r0   r1   r[  r[  i  s       eol 9+ , , ,G %,q /L M M MK  5< 2J K K KL  5< 0G H H HL !E *? *? *?E;< < <E !E /C /C /CI9: : :EEEr0   r[  )Bry  r  numpyr   rr   r   matplotlib.collectionsr   matplotlib.datesr   r   packaging.versionr   core.dimensionr	   r
   core.optionsr   r   	core.utilr   r   r   r   r   r   r   r   rV   r   r   	operationr   util.transformr   mixinsr   r   r   rE   r   utilr   r   r    r"   r#   r$   pathr%   r&   r'   r(   r*   r3   r   r   r   r   r  ro  r  r  r  rD  r[  r/   r0   r1   <module>ri     s~                  1 1 1 1 1 1 4 4 4 4 4 4 4 4 % % % % % % 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ' & & & & & & & * * * * * * ! ! ! ! ! ! 6 6 6 6 6 6 6 6 6 6       G G G G G G G G G G : : : : : : : : : :       . . . . . . . .             E E E E E	 E E ERZ Z Z Z Z Z Z Z|! ! ! ! !y) ! ! !>: : : : :< : : :.H H H H H H H H6] ] ] ] ]L ] ] ]@c. c. c. c. c.m c. c. c.Ly6 y6 y6 y6 y6	< y6 y6 y6zY Y Y Y Yl Y Y Yzz% z% z% z% z%iz z% z% z%|i i i i ih i i iX: : : : :\: : : : : :r0   