a
    f1bB                     @   s   d dl Zd dlmZ d dlmZ d dlmZ d dl	m
Z
 e  d dlmZ W d   n1 sb0    Y  edgddd	d
 ZdS )    N)_api)image_comparison)Bbox)clip_line_to_rectzclip_path.pngdefault)Zstylec                  C   s  t g d} t t| }t \}}|j| |dd tdddd}tj	|j
|j|jdd	d
d}|| t| ||\}}|D ]>\}}	|j||	ddd t||	D ]\}
}||
|sJ qqtg d}|D ]0}t|}|D ]\\}}}||g|g| qqd S )N)g                 r   r
   r   r	   r   r      r
   )lwr   r   r   g      )@Znonekz--)Z	facecolorZ	edgecolorZlsZC1)r   Zcolor)C3oC2xr   r   )npZarrayZarangelenpltZsubplotsZplotr   Zfrom_extentsZ	RectangleZp0widthZheightZ	add_patchr   zipcontainsiternext)xyZfigZaxZbboxZrectZclipped_linesZticksZlxZlyZpxpyZcccZtttZccZxxZyyZaa r   Klib/python3.9/site-packages/mpl_toolkits/tests/test_axisartist_clip_path.pytest_clip_path   s&    
r   )Znumpyr   Z
matplotlibr   Zmatplotlib.pyplotZpyplotr   Zmatplotlib.testing.decoratorsr   Zmatplotlib.transformsr   Z'suppress_matplotlib_deprecation_warningZ!mpl_toolkits.axisartist.clip_pathr   r   r   r   r   r   <module>   s   
*