B
    }‹dc  ã               @   s*   d Z ddlmZ dZG dd„ dejƒZdS )z,Extensions of `~matplotlib.legend` for gwpy
é    )Úlegend_handlerz(Duncan Macleod <duncan.macleod@ligo.org>c                   s.   e Zd ZdZd‡ fdd„	Z‡ fdd„Z‡  ZS )ÚHandlerLine2Da€  Custom Line2D legend handler that draws lines with custom linewidth

    Parameters
    ----------
    linewidth : `float`, optional
        the linewidth to use when drawing lines on the legend

    **kw
        all keywords are passed to `matplotlib.legend_handler.HandlerLine2D`

    See also
    --------
    matplotlib.legend_handler.HanderLine2D
        for all information
    ç      @c                s   t ƒ jf |Ž || _d S )N)ÚsuperÚ__init__Ú
_linewidth)ÚselfZ	linewidthÚkw)Ú	__class__© ú]/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/gwpy/plot/legend.pyr   +   s    zHandlerLine2D.__init__c                s"   t ƒ j||Ž}|d  | j¡ |S )Nr   )r   Úcreate_artistsZset_linewidthr   )r   ÚargsÚkwargsZartists)r
   r   r   r   /   s
    zHandlerLine2D.create_artists)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   )r
   r   r      s   r   N)r   Z
matplotlibr   Ú
__author__r   r   r   r   r   Ú<module>   s   