
    eR                     R    d dl Zd dlmZmZmZ ddlmZmZm	Z	  G d de          Z
dS )    N)DatasetImageQuadMesh   )TestMPLPlotmpl38mpl_rendererc                   &    e Zd Zd Zd Zd Zd ZdS )TestQuadMeshPlotc                 &   t          j        g dg dg          }t          t          |                                        d          }t          j        |          }|j        d         }t          rGt           j	        
                    |                                j        |d d d         j                   d S t           j	        
                    |                                j        |j        d d d                                                    d S )Nr   r               T)invert_axesartist)nparrayr   r   optsr	   get_plothandlesr   testingassert_equal	get_arraydataTflatten)selfarrqmeshplotr   s        Ulib/python3.11/site-packages/holoviews/tests/plotting/matplotlib/test_quadmeshplot.pytest_quadmesh_invert_axesz*TestQuadMeshPlot.test_quadmesh_invert_axes
   s    h			999-..s$$))d);;$U++h' 	TJ##F$4$4$6$6$;S2Y[IIIIIJ##F$4$4$6$6$;SU44R4[=P=P=R=RSSSSS    c                    t          j        g dg dg          }t          t          |                                        d          }t          j        |          }|j        d         }t          r&t          j        g dt           j	        ddgg          }n$t          j        dd	d
t           j	        ddg          }t           j
                            |                                j        |           d S )Nr   r   r   nodatar   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   nanr   r   r   r   r!   r"   r#   r$   r   expecteds         r%   test_quadmesh_nodataz%TestQuadMeshPlot.test_quadmesh_nodata   s    h			999-..s$$)))33$U++h' 	9xRVQN ;<<HHxAq"&!Q 788H

 0 0 2 2 7BBBBBr'   c                    t          j        g dg dgd          }t          t          |                                        d          }t          j        |          }|j        d         }t          r&t          j        g dt           j	        dd	gg          }n$t          j        d
ddt           j	        dd	g          }t           j
                            |                                j        |           d S )Nr   r   uint32)dtyper   r)   r   r   r   r   r   r   r+   r-   s         r%   test_quadmesh_nodata_uintz*TestQuadMeshPlot.test_quadmesh_nodata_uint    s    h			999-X>>>s$$)))33$U++h' 	9xRVQN ;<<HHxAq"&!Q 788H

 0 0 2 2 7BBBBBr'   c                 ~   t          j        ddd          x}}t          j        ddd          }t          j        |||          \  }}}t          j        |          |z  }t	          ||||j        fg dd          }|                    t                                        d	d	
          }	t          j
        |	          }
|
j        d         }t           j                            |j        |j        gddg           |
                    d           t           j                            |j        |j        gddg           d S )Nr      
   r   r   r   )xyzvaluesT)colorbar	framewisecbargեcMpgK%?r   g1Cg6?)r   linspacemeshgridsinr   r   tor   r   r	   r   r   r   assert_allclosevminvmaxupdate)r!   xsyszsXS_YSZSr:   dshmapr$   r=   s               r%   test_quadmesh_update_cbarz*TestQuadMeshPlot.test_quadmesh_update_cbar+   s   +aB'''R[Aq!!k"b"--Cbb"b&(+___hGGuuX##TT#BB$T**|F#

""DIty#9<OQc;deeeA

""DIty#9<OQc;deeeeer'   N)__name__
__module____qualname__r&   r/   r3   rN    r'   r%   r   r      s^        T T T
C 
C 
C	C 	C 	Cf f f f fr'   r   )numpyr   holoviews.elementr   r   r   	test_plotr   r   r	   r   rR   r'   r%   <module>rV      s        6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7.f .f .f .f .f{ .f .f .f .f .fr'   