
    eKZ                        d dl Z d dlZd dlZd dlmZmZmZm	Z	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mZ erd dlm	ZmZmZmZ erd dlm Z   G d d	e          Z! G d
 de          Z" G d de          Z# G d de          Z$ G d de          Z% G d de          Z& G d de          Z' G d de          Z(dS )    N)ArrowHLineHLinesHSpanHSpansLabelsSlopeTextVLineVLinesVSpanVSpans)bokeh32bokeh33   )TestBokehPlotbokeh_renderer)r   HStripr   VStrip)Nodec                   &    e Zd Zd Zd Zd Zd ZdS )TestHVLinePlotc                     t          d                              d          }t          j        |          }|j        d         }|                     |j        d           |                     |j        d           d S )N皙?Tinvert_axesglyphheight)r   optsr   get_plothandlesassertEqual	dimensionlocationselfhlineplotspans       Rlib/python3.11/site-packages/holoviews/tests/plotting/bokeh/test_annotationplot.pytest_hline_invert_axesz%TestHVLinePlot.test_hline_invert_axes&   sm    c

D11&u--|G$222,,,,,    c                     t          d          }t          j        |          }|j        d         }|                     |j        d           |                     |j        d           d S )Nr   r   width)r   r   r    r!   r"   r#   r$   r%   s       r*   test_hline_plotzTestHVLinePlot.test_hline_plot-   s_    c

&u--|G$111,,,,,r,   c                     t          d                              d          }t          j        |          }|j        d         }|                     |j        d           |                     |j        d           d S )Nr   Tr   r   r.   )r   r   r   r    r!   r"   r#   r$   r&   vliner(   r)   s       r*   test_vline_invert_axesz%TestHVLinePlot.test_vline_invert_axes4   sm    c

D11&u--|G$111,,,,,r,   c                     t          d          }t          j        |          }|j        d         }|                     |j        d           |                     |j        d           d S )Nr   r   r   )r   r   r    r!   r"   r#   r$   r1   s       r*   test_vline_plotzTestHVLinePlot.test_vline_plot;   s_    c

&u--|G$222,,,,,r,   N)__name__
__module____qualname__r+   r/   r3   r5    r,   r*   r   r   $   sP        - - -- - -- - -- - - - -r,   r   c                   2    e Zd Zd Zd Zd Zd Zd Zd ZdS )TestHVSpanPlotc                 z   t          dd                              d          }t          j        |          }|j        d         }|j        dk    sJ |j        dk    sJ t          r9t          |j	        t                    sJ t          |j        t                    sJ n|j	        J |j        J |j        sJ d S Nr         ?Tr   r   )r   r   r   r    r!   leftrightr   
isinstancebottomr   topvisibler&   hspanr(   r)   s       r*   test_hspan_invert_axesz%TestHVSpanPlot.test_hspan_invert_axesE   s    c3$$$66&u--|G$yCzS     	$dk400000dh------;&&&8###|r,   c                 R   t          dd          }t          j        |          }|j        d         }t          r9t          |j        t                    sJ t          |j        t                    sJ n|j        J |j        J |j	        dk    sJ |j
        dk    sJ |j        sJ d S Nr   r>   r   )r   r   r    r!   r   rA   r?   r   r@   rB   rC   rD   rE   s       r*   test_hspan_plotzTestHVSpanPlot.test_hspan_plotT   s    c3&u--|G$ 	&di.....dj$//////9$$$:%%%{c!!!!x3|r,   c                     t          d           }t          j        |          }|j        d         }|                     |j        d           d S Nr   F)r   r   r    r!   r"   rD   r1   s       r*   test_hspan_emptyzTestHVSpanPlot.test_hspan_emptyb   G    d&u--|G$u-----r,   c                 z   t          dd                              d          }t          j        |          }|j        d         }t
          r9t          |j        t                    sJ t          |j	        t                    sJ n|j        J |j	        J |j
        dk    sJ |j        dk    sJ |j        sJ d S r=   )r   r   r   r    r!   r   rA   r?   r   r@   rB   rC   rD   r&   vspanr(   r)   s       r*   test_vspan_invert_axesz%TestHVSpanPlot.test_vspan_invert_axesh   s    c3$$$66&u--|G$ 	&di.....dj$//////9$$$:%%%{c!!!!x3|r,   c                 R   t          dd          }t          j        |          }|j        d         }|j        dk    sJ |j        dk    sJ t          r9t          |j        t                    sJ t          |j
        t                    sJ n|j        J |j
        J |j        sJ d S rI   )r   r   r    r!   r?   r@   r   rA   rB   r   rC   rD   rP   s       r*   test_vspan_plotzTestHVSpanPlot.test_vspan_plotv   s    c3&u--|G$yCzS     	$dk400000dh------;&&&8###|r,   c                     t          d           }t          j        |          }|j        d         }|                     |j        d           d S rL   )r   r   r    r!   r"   rD   r1   s       r*   test_vspan_emptyzTestHVSpanPlot.test_vspan_empty   rN   r,   N)	r6   r7   r8   rG   rJ   rM   rR   rT   rV   r9   r,   r*   r;   r;   C   sn            . . .    . . . . .r,   r;   c                       e Zd Zd Zd ZdS )TestSlopePlotc                     t          dd          }t          j        |          }|j        d         }|                     |j        d           |                     |j        d           d S )N   
   r   )r	   r   r    r!   r"   gradienty_interceptr&   rF   r(   slopes       r*   
test_slopezTestSlopePlot.test_slope   sb    a&u--W%+++*B/////r,   c                     t          dd                              d          }t          j        |          }|j        d         }|                     |j        d           |                     |j        d           d S )NrZ   r[   Tr   r         ?)r	   r   r   r    r!   r"   r\   r]   r^   s       r*   test_slope_invert_axesz$TestSlopePlot.test_slope_invert_axes   ss    a!!d!33&u--W%---*B/////r,   N)r6   r7   r8   r`   rd   r9   r,   r*   rX   rX      s2        0 0 00 0 0 0 0r,   rX   c                   &    e Zd Zd Zd Zd Zd ZdS )TestTextPlotc                     t          ddd          }t          j        |          }|j        d         }|                     |j        dgdgdgd           d S )Nr   Testsourcexytext)r
   r   r    r!   r"   data)r&   rm   r(   ri   s       r*   test_text_plotzTestTextPlot.test_text_plot   s]    Aq&!!&t,,h'QCqcF8&L&LMMMMMr,   c                     t          dddd          }t          j        |          }|j        d         }|                     |j        d           d S )Nr   rh      )fontsizer   18Pt)r
   r   r    r!   r"   text_font_sizer&   rm   r(   r   s       r*   test_text_plot_fontsizez$TestTextPlot.test_text_plot_fontsize   sS    Aq&2...&t,,W%-v66666r,   c                     t          dddd          }t          j        |          }|j        d         }|                     |j        t          j        dz             d S )Nr   rh   Z   )rotationr          @)r
   r   r    r!   r"   anglenppiru   s       r*   test_text_plot_rotationz$TestTextPlot.test_text_plot_rotation   sX    Aq&2...&t,,W%beBh/////r,   c                     t          ddd                              d          }t          j        |          }|j        d         }|                     |j        t          j        dz             d S )Nr   rh   rx   r{   r   rz   )	r
   r   r   r    r!   r"   r{   r|   r}   ru   s       r*   test_text_plot_rotation_stylez*TestTextPlot.test_text_plot_rotation_style   sd    Aq&!!&&R&00&t,,W%beBh/////r,   N)r6   r7   r8   ro   rv   r~   r   r9   r,   r*   rf   rf      sS        N N N7 7 70 0 00 0 0 0 0r,   rf   c                   ,    e Zd Zd Zd Zd Zd Zd ZdS )TestArrowPlotc                 z   t          |j                   |j        d         }|j        d         }|j        d         }|j        d         }|\  }}	|\  }
}|                     |j        d           |                     |j        d           |                     |j        |g|	gdgd           |                     |j        d	           |                     |j        d
           |                     |j        d           |                     |j	        d           |                     |j        |g|
g|	g|gd           d S )Narrow_1_glypharrow_1_sourcetext_1_glyphtext_1_sourcerk   rl   rh   rj   x_starty_startx_endy_end)r   r   r   r   )
printr!   r"   rk   rl   rn   r   r   r   r   )r&   r(   startendarrow_glyph	arrow_cdslabel_glyph	label_cdsx0y0x1y1s               r*   _compare_arrow_plotz!TestArrowPlot._compare_arrow_plot   sY   dll?3L!12	l>2L1	BB,,,,,,t2$)Q)QRRR,i888,i888*G444*G444bTRD68TRD*J *J 	K 	K 	K 	K 	Kr,   c                 ~    t          ddd          }t          j        |          }|                     |dd           d S )Nr   rh   )UUUUUU?r   r   r   r   r   r    r   r&   arrowr(   s      r*   test_arrow_plot_leftz"TestArrowPlot.test_arrow_plot_left   sA    aF##&u--  y&99999r,   c                     t          dddd          }t          j        |          }|                     |dd           d S )Nr   rh   ^)r   UUUUUUſr   r   r   s      r*   test_arrow_plot_upz TestArrowPlot.test_arrow_plot_up   C    aFC((&u--  z6:::::r,   c                     t          dddd          }t          j        |          }|                     |dd           d S )Nr   rh   >)r   r   r   r   r   s      r*   test_arrow_plot_rightz#TestArrowPlot.test_arrow_plot_right   r   r,   c                     t          dddd          }t          j        |          }|                     |dd           d S )Nr   rh   v)r   r   r   r   r   s      r*   test_arrow_plot_downz"TestArrowPlot.test_arrow_plot_down   sC    aFC((&u--  y&99999r,   N)r6   r7   r8   r   r   r   r   r   r9   r,   r*   r   r      sb        K K K&: : :
; ; ;
; ; ;
: : : : :r,   r   c                       e Zd Zd Zd ZdS )TestLabelsPlotc                 8   t          dg          }t          j        |          }|j        d         }t	          j        dg          t	          j        dg          dgd}|j                                        D ]!\  }}|                     |||                    "d S )Nr   r   rh   ri   r   rh   )rk   rl   Label)	r   r   r    r!   r|   arrayrn   itemsr"   )r&   rm   r(   ri   rn   ccols          r*   test_labels_plotzTestLabelsPlot.test_labels_plot   s    ~&''&t,,h'Xqc]]1#&JJk'')) 	+ 	+FAsS$q'****	+ 	+r,   c                     t          dg                              d          }t          j        |          }|j        d         }|                     |j        t          j        dz             d S )Nr   rx   r   r   rz   )	r   r   r   r    r!   r"   r{   r|   r}   ru   s       r*   test_labels_plot_rotation_stylez.TestLabelsPlot.test_labels_plot_rotation_style   sc    ~&'',,2,66&t,,W%beBh/////r,   N)r6   r7   r8   r   r   r9   r,   r*   r   r      s2        + + +0 0 0 0 0r,   r   c                   `     e Zd Z fdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Z xZS )TestHVLinesPlotc                 ~    t           st          j        d          t                                                       d S )NzBokeh 3.2 added H/VLinesr   unittestSkipTestsupersetUpr&   	__class__s    r*   r   zTestHVLinesPlot.setUp   3     	@#$>???r,   c                 b   t          g dg dddg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        dk    sJ |j        d	         j        d
k    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  d
gk    sJ |j
        d
         g dk                                    sJ d S )Nr   r   rZ         @irl   extrar   vdimsr   xaxisrk   yaxisrl   x_ranger   r   y_ranger   ri   r   r   r    rA   r!   BkHSpan
axis_labelr   r   listrn   allr&   hlinesr(   ri   s       r*   test_hlines_plotz TestHVLinesPlot.test_hlines_plot   sX    ..+<+<+<==gY
 
 
 &v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  SE))))C NNN2779999999r,   c                 .   t          g dg dddg                              dd          }t          j        |          }t	          |j        d         t                    sJ |j        d	         j        dk    sJ |j        d
         j        dk    sJ d S )Nr   r   r   r   r   xlabelr   ylabelr   r   r   )r   r   r   r    rA   r!   r   r   )r&   r   r(   s      r*   test_hlines_xlabel_ylabelz)TestHVLinesPlot.test_hlines_xlabel_ylabel  s     ..+<+<+<==gY
 
 

$hx$
0
0 	 &v..$,w/99999|G$/8;;;;|G$/8;;;;;;r,   c                 v   t          t          j        g d                    }t          j        |          }t          |j        d         t                    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         j
        d	k    sJ |j        d
         j	        dk    sJ |j        d
         j
        dk    sJ |j        d         }t          |j                  dgk    sJ |j        d         g dk                                    sJ d S )Nr   r   r   rk   r   rl   r   r   r   r   r   ri   )r   r|   r   r   r    rA   r!   r   r   r   r   r   rn   r   r   s       r*   test_hlines_arrayz!TestHVLinesPlot.test_hlines_array  sC   0011&v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  SE))))C NNN2779999999r,   c                    t          g dg dddg                              d          }t          j        |          }t	          |j        d         t                    sJ |j        d	         j        d
k    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         }t          |j                  d
gk    sJ |j        d
         g dk                                    sJ d S )Nr   r   r   r   r   Tr   r   r   rl   r   rk   r   r   r   r   r   ri   )r   r   r   r    rA   r!   BkVSpanr   r   r   r   rn   r   r   s       r*   test_hlines_plot_invert_axesz,TestHVLinesPlot.test_hlines_plot_invert_axes%  sj    ..+<+<+<==gY
 
 

$4$
 
  	 &v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*a////h'FK  SE))))C NNN2779999999r,   c                 \   t          dg didg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d	         j        d
k    sJ |j        d	         j        dk    sJ |j        d         j        d
k    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  dgk    sJ |j
        d         g dk                                    sJ d S )Nr   r   kdimsr   r   rk   r   rl   r   r   r   r   r   ri   r   r   s       r*   test_hlines_nondefault_kdimz+TestHVLinesPlot.test_hlines_nondefault_kdim7  sN   nnn%gY
 
 
 &v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  WI----G$6;;=======r,   c                 b   t          g dg dddg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        dk    sJ |j        d	         j        d
k    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  dgk    sJ |j
        d         g dk                                    sJ d S )Nr   r   rk   r   r   r   r   r   rk   r   rl   r   r   r   r   r   ri   r   r   r    rA   r!   r   r   r   r   r   rn   r   r&   vlinesr(   ri   s       r*   test_vlines_plotz TestHVLinesPlot.test_vlines_plotI  sX    ..+<+<+<==gY
 
 
 &v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*a////h'FK  SE))))C NNN2779999999r,   c                    t          g dg dddg                              d          }t          j        |          }t	          |j        d         t                    sJ |j        d	         j        d
k    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         }t          |j                  dgk    sJ |j        d         g dk                                    sJ d S )Nr   r   r   r   r   Tr   r   r   rl   r   rk   r   r   r   r   r   ri   )r   r   r   r    rA   r!   r   r   r   r   r   rn   r   r   s       r*   test_vlines_plot_invert_axesz,TestHVLinesPlot.test_vlines_plot_invert_axes[  sj    ..+<+<+<==gY
 
 

$4$
 
  	 &v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  SE))))C NNN2779999999r,   c                 \   t          dg didg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d	         j        d
k    sJ |j        d	         j        dk    sJ |j        d         j        d
k    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  dgk    sJ |j
        d         g dk                                    sJ d S )Nr   r   r   r   r   rk   r   rl   r   r   r   r   r   ri   r   r   s       r*   test_vlines_nondefault_kdimz+TestHVLinesPlot.test_vlines_nondefault_kdimm  sN   nnn%gY
 
 
 &v..$,w/99999|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*a////h'FK  WI----G$6;;=======r,   c                    t          g dg dddg          }t          g dg dddg          }t          j        ||z            }|j        d         j        dk    sJ |j        d	         j        d
k    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ d S )Nr   r   r   r   r   r   r   rk   r   rl   r   r   r   r   )r   r   r   r    r!   r   r   r   )r&   r   r   r(   s       r*   test_vlines_hlines_overlayz*TestHVLinesPlot.test_vlines_hlines_overlay  s    ..+<+<+<==gY
 
 
  ..+<+<+<==gY
 
 
 &v77|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*c111111r,   c                 ,   t          j        g dg          }t          g dg dddg          }t          g dg dddg          }t	          j        ||z  |z            }|j        d	         j        dk    sJ |j        d
         j        dk    sJ d S )Ntimer   r   r   r   r   r   r   r   r   rl   )hvCurver   r   r   r    r!   r   )r&   non_annotationr   r   r(   s        r*   )test_vlines_hlines_overlay_non_annotationz9TestHVLinesPlot.test_vlines_hlines_overlay_non_annotation  s    "VH555 ..+<+<+<==gY
 
 
  ..+<+<+<==gY
 
 
 &~'>'GHH|G$/69999|G$/3666666r,   c           	         t          dg di          }|                    t          j        d                                          dt          j        d                              g dddg                    }t          j        d                              |          }|j        d	         j	        dk    sJ |j        d
         j
        j        }t          j                            |d         g d           |d         g dk    sJ d S )Nrl   )r   rZ      red)r   r>   r   dashedsolidalpha
line_color	line_dashbokehr   glyph_rendererr   r   rb   r   r  r   r   r   )r   r   r   dimnormbinrendererr    r!   r   data_sourcern   r|   testingassert_allclose)r&   r   r(   rn   s       r*   test_coloring_hlinez#TestHVLinesPlot.test_coloring_hline  s    iii())&++""$$fSkkookkkHg3FGG  
 
 {7##,,V44|G$/58888|,-9>

""4=+++>>>K $@$@$@@@@@@@r,   )r6   r7   r8   r   r   r   r   r   r   r   r   r   r   r   r  __classcell__r   s   @r*   r   r      s            
: : :$< < <: : : : : :$> > >$: : :$: : :$> > >$2 2 2 
7 
7 
7A A A A A A Ar,   r   c                   f     e Zd Z fdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Z xZS )TestHVSpansPlotc                 ~    t           st          j        d          t                                                       d S )NzBokeh 3.2 added H/VSpansr   r   s    r*   r   zTestHVSpansPlot.setUp  r   r,   c                    t          g dg dg dddg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        d	k    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  ddgk    sJ |j
        d         g dk                                    sJ |j
        d         g dk                                    sJ d S )Nr   r   r   r            @r   r   r   r   r   r   r   r   r   r   rk   r   rl   r   r   r   r   r  ri   r   r   r   r   r    rA   r!   BkHStripr   r   r   r   rn   r   r&   hspansr(   ri   s       r*   test_hspans_plotz TestHVSpansPlot.test_hspans_plot  s   ;;kkkLLLIIRYQZ
 
 
 &v..$,w/:::::|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  T4L0000D![[[05577777D![[[0557777777r,   c                 4   t          g dg dg dddg                              dd          }t          j        |          }t	          |j        d	         t                    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ d S )Nr  r  r  r  r   r   r   r   r   r   r   )r   r   r   r    rA   r!   r  r   )r&   r  r(   s      r*   test_hspans_plot_xlabel_ylabelz.TestHVSpansPlot.test_hspans_plot_xlabel_ylabel  s    ;;kkkLLLIIRYQZ
 
 

$hx$
0
0 	 &v..$,w/:::::|G$/8;;;;|G$/8;;;;;;r,   c                    t          g dg dg dddg                              d          }t          j        |          }t	          |j        d	         t                    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         }t          |j                  ddgk    sJ |j        d         g dk                                    sJ |j        d         g dk                                    sJ d S )Nr  r  r  r  r   r   Tr   r   r   rl   r   rk   r   r   r  r   r   ri   r   r   )r   r   r   r    rA   r!   BkVStripr   r   r   r   rn   r   r  s       r*   test_hspans_plot_invert_axesz,TestHVSpansPlot.test_hspans_plot_invert_axes  s   ;;kkkLLLIIRYQZ
 
 

$4$
 
  	 &v..$,w/:::::|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*a////h'FK  T4L0000D![[[05577777D![[[0557777777r,   c                    t          g dg ddddg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        d	k    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  ddgk    sJ |j
        d         g dk                                    sJ |j
        d         g dk                                    sJ d S )Nr  r  other0other1r&  r'  r   r   r   rk   r   rl   r   r   r   r   r  ri   r  r  s       r*   test_hspans_nondefault_kdimsz,TestHVSpansPlot.test_hspans_nondefault_kdims  s   "{{kkk::8XBV
 
 
 &v..$,w/:::::|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  Xx$88888H%499;;;;;H%499;;;;;;;r,   c                    t          g dg dg dddg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        d	k    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  ddgk    sJ |j
        d         g dk                                    sJ |j
        d         g dk                                    sJ d S )Nr  r  r  r   r   r   r   r   r   r   rk   r   rl   r   r   r  r   r   ri   r   r   r   r   r    rA   r!   r"  r   r   r   r   rn   r   r&   vspansr(   ri   s       r*   test_vspans_plotz TestHVSpansPlot.test_vspans_plot  s   ;;kkkLLLIIRYQZ
 
 
 &v..$,w/:::::|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*a////h'FK  T4L0000D![[[05577777D![[[0557777777r,   c                    t          g dg dg dddg                              d          }t          j        |          }t	          |j        d	         t                    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         j        dk    sJ |j        d         j	        dk    sJ |j        d         }t          |j                  ddgk    sJ |j        d         g dk                                    sJ |j        d         g dk                                    sJ d S )Nr  r  r  r*  r   r   Tr   r   r   rl   r   rk   r   r   r   r   r  ri   r   r   )r   r   r   r    rA   r!   r  r   r   r   r   rn   r   r,  s       r*   test_vspans_plot_invert_axesz,TestHVSpansPlot.test_vspans_plot_invert_axes  s   ;;kkkLLLIIRYQZ
 
 

$4$
 
  	 &v..$,w/:::::|G$/36666|G$/36666|I&,1111|I&*a////|I&,1111|I&*c1111h'FK  T4L0000D![[[05577777D![[[0557777777r,   c                    t          g dg ddddg          }t          j        |          }t          |j        d         t
                    sJ |j        d         j        d	k    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         }t          |j
                  ddgk    sJ |j
        d         g dk                                    sJ |j
        d         g dk                                    sJ d S )Nr  r  r%  r&  r'  r   r   r   rk   r   rl   r   r   r  r   r   ri   r+  r,  s       r*   test_vspans_nondefault_kdimsz,TestHVSpansPlot.test_vspans_nondefault_kdims  s   "{{kkk::8XBV
 
 
 &v..$,w/:::::|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*a////h'FK  Xx$88888H%499;;;;;H%499;;;;;;;r,   c                    t          j        ddgddgg          t          j        fd          }t          j                  }t          j        |          }|j        d         j        |j        d         j        k    sJ |j        d         j        |j        d         j        k    sJ |j        d         j        |j        d         j        k    sJ |j        d         j        |j        d         j        k    sJ d S )	Nr   r   rZ   r  rn   c                  .    t          j         g          S Nr   Overlayels   r*   <lambda>z@TestHVSpansPlot.test_dynamicmap_overlay_vspans.<locals>.<lambda>/      RZ%5%5 r,   r   r   )r   r   
DynamicMapr   r    r!   r   r   r&   dmapplot_el	plot_dmapr:  s       @r*   test_dynamicmap_overlay_vspansz.TestHVSpansPlot.test_dynamicmap_overlay_vspans-      YaVaV,---}555566 )"--"+D11	y)/93DY3O3UUUUUy)-1B91M1QQQQQy)/93DY3O3UUUUUy)-1B91M1QQQQQQQr,   c                    t          g dg dg dddg          }t          g dg dg dddg          }t          j        ||z            }|j        d         j        d	k    sJ |j        d
         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ |j        d         j        dk    sJ d S )Nr  r  r  r  r   r   r*  r   rk   r   rl   r   r   r  r   )r   r   r   r    r!   r   r   r   )r&   r  r-  r(   s       r*   test_vspans_hspans_overlayz*TestHVSpansPlot.test_vspans_hspans_overlay9  s(   ;;kkkLLLIIRYQZ
 
 
 ;;kkkLLLIIRYQZ
 
 
 &v77|G$/36666|G$/36666|I&,1111|I&*c1111|I&,1111|I&*c111111r,   c                 8   t          j        g dg          }t          g dg dg dddg          }t          g dg dg dd	dg          }t	          j        ||z  |z            }|j        d
         j        dk    sJ |j        d         j        dk    sJ d S )Nr   r   r  r  r  r  r   r   r*  r   r   rl   )r   r   r   r   r   r    r!   r   )r&   r   r  r-  r(   s        r*   r   z9TestHVSpansPlot.test_vlines_hlines_overlay_non_annotationI  s    "VH555;;kkkLLLIIRYQZ
 
 
 ;;kkkLLLIIRYQZ
 
 
 &~'>'GHH|G$/69999|G$/3666666r,   c           	         t          g dg dd                              t          j        d                                          dt          j        d                              g ddd	g          
          }t          j        d                              |          }|j        d         j	        dk    sJ |j        d         j
        j        }t          j                            |d         g d           |d         g dk    sJ d S )N)r   r      )rZ   r     )r   r   r   r   r   )r   r   rI  r   r   r   r  r   r  r   r  r  r  )r   r   r   r  r  r  r	  r    r!   r   r
  rn   r|   r  r  )r&   r  r(   rn   s       r*   r  z#TestHVSpansPlot.test_coloring_hlineU  s   yyy			::;;@@&,,##%%fTll&&yyy8W2EFF A 
 
 {7##,,V44|G$/58888|,-9>

""4=+++>>>K $@$@$@@@@@@@r,   c                    t          j        ddgddgg          t          j        fd          }t          j                  }t          j        |          }|j        d         j        |j        d         j        k    sJ |j        d         j        |j        d         j        k    sJ |j        d         j        |j        d         j        k    sJ |j        d         j        |j        d         j        k    sJ d S )	Nr   r   rZ   r  r4  c                  .    t          j         g          S r6  r7  r9  s   r*   r;  z@TestHVSpansPlot.test_dynamicmap_overlay_hspans.<locals>.<lambda>e  r<  r,   r   r   )r   r   r=  r   r    r!   r   r   r>  s       @r*   test_dynamicmap_overlay_hspansz.TestHVSpansPlot.test_dynamicmap_overlay_hspansc  rC  r,   )r6   r7   r8   r   r  r   r#  r(  r.  r0  r2  rB  rE  r   r  rL  r  r  s   @r*   r  r    s            
8 8 8&< < <8 8 8&< < <&8 8 8&8 8 8&< < <&
R 
R 
R2 2 2 
7 
7 
7A A A
R 
R 
R 
R 
R 
R 
Rr,   r  ))r   numpyr|   	holoviewsr   holoviews.elementr   r   r   r   r   r   r	   r
   r   r   r   r   holoviews.plotting.bokeh.utilr   r   	test_plotr   r   bokeh.modelsr   r   r  r   r   r"  bokeh.models.coordinatesr   r   r;   rX   rf   r   r   r   r  r9   r,   r*   <module>rT     s                                       ; : : : : : : : 4 4 4 4 4 4 4 4
              .------- - - - -] - - ->E. E. E. E. E.] E. E. E.P0 0 0 0 0M 0 0 0$0 0 0 0 0= 0 0 06': ': ': ': ':M ': ': ':T0 0 0 0 0] 0 0 0"uA uA uA uA uAm uA uA uApBR BR BR BR BRm BR BR BR BR BRr,   