OwlCyberSecurity - MANAGER
Edit File: test_lines.cpython-38.pyc
U ��]6 � @ s8 d Z ddlZddlZddlmZ ddlZddlZddlZddlm Z ddlmZ ddlmZmZ ejjdd�dd� �Zd d � Zedgdd �dd� �Zdd� Zdd� Zdd� Zedgddgd�dd� �Zdd� Zdd� Zedgdd d!�d"d#� �Zed$gddgd�d%d&� �Zed'gd(d)�d*d+� �Zd,d-� Ze� d.d/� �Z dS )0z% Tests specific to the lines module. � N)�cycler)�image_comparison�check_figures_equal� )Zrerunsc C s� d} t �dd| �}t jj| d�}t�� }t�d�}t�||�}|� d� t tj|j jddd��}|�|� t tj|j jddd��}|| }d } || k s�t�d S )ac Github issue #1256 identified a bug in Line.draw method Despite visibility attribute set to False, the draw method was not returning early enough and some pre-rendering code was executed though not necessary. Consequence was an excessive draw time for invisible Line instances holding a large number of points (Npts> 10**6) i��� r � )�size�o Fr )Znumber�repeat� N)�np�linspace�randomZnormal�plt�figureZsubplot�mlines�Line2DZset_visible�min�timeitr �canvas�drawZadd_line�AssertionError) �N�x�y�fig�ax�lZ t_no_lineZt_invisible_lineZslowdown_factorZslowdown_threshold� r �=/usr/lib/python3/dist-packages/matplotlib/tests/test_lines.py�test_invisible_Line_rendering s r c C sH t �� } | �ddd�}tj�d� |jtj�dd�dgd�}dsDt�d S )Nr r � � �r )r r �Z linestylesT) r r �add_subplotr r �seed�contour�randnr �r r Zcsr r r �test_set_line_coll_dash@ s r) Zline_dashesT)�baseline_images�remove_textc C s. t �� } | �ddd�}|jtd�ddd� d S )Nr � r"