U
    Ñtœdú  ã                   @   s(   d Z ddlmZ dZG dd„ deƒZdS )zLThis module provides implementation for a Matplotlib-specific matrix drawer.é    )ÚAbstractDrawer)ÚMatplotlibMatrixDrawerc                   @   s    e Zd ZdZdd„ Zdd„ ZdS )r   z&Matplotlib drawer object for matrices.c                 C   s
   || _ dS )zvConstructs the drawer and associates it to the given Axes.

        @param ax: the Axes on which we will draw
        N)Úcontext)ÚselfÚax© r   úY/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/igraph/drawing/matplotlib/matrix.pyÚ__init__   s    zMatplotlibMatrixDrawer.__init__c                 K   s"   | j }|j|jfddi|—Ž dS )zžDraws the given Matrix in a matplotlib Axes.

        @param matrix: the igraph.Matrix to plot.

        Keyword arguments are passed to Axes.imshow.
        ÚinterpolationZnearestN)r   ZimshowÚdata)r   ÚmatrixÚkwdsr   r   r   r   Údraw   s    zMatplotlibMatrixDrawer.drawN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   r   r   r   r   r      s   r   N)r   Zigraph.drawing.baseclassesr   Ú__all__r   r   r   r   r   Ú<module>   s   