OwlCyberSecurity - MANAGER
Edit File: test_legend.cpython-38.pyc
U ��]iN � @ s� d dl Z d dlZd dlmZ d dlZd dlZd dlmZ d dl m Z d dlZ d dlmZ d dlm Z d dlmZ d dlmZ d dlmZ d dlmZ dd� Zed gd d�dd � �Zedgd d�dd� �Zedgd�dd� �Zedgd d�dd� �Zedgdgd d�dd� �Z edgdgd d�dd� �Z!ed gd!d"i�"e�#� d#�dgd d$�d%d&� �Z$ed'gd!d"i�"e�#� d#�dgd d$�d(d)� �Z%ed*gd d�d+d,� �Z&ed-gd d!d"i�"e�#� d#�d.�d/d0� �Z'ed1d2gd d�d3d4� �Z(ed5gd d�d6d7� �Z)ed8gd d9d:�d;d<� �Z*d=d>� Z+G d?d@� d@e,�Z-G dAdB� dBe,�Z.edCgdgdD�dEdF� �Z/dGdH� Z0dIdJ� Z1dKdL� Z2edMgdgdD�dNdO� �Z3edPgdgdD�dQdR� �Z4dSdT� Z5dUdV� Z6dWdX� Z7dYdZ� Z8d[d\� Z9d]d^� Z:d_d`� Z;dadb� Z<dcdd� Z=dedf� Z>dgdh� Z?dS )i� N)�mock)�image_comparison)�HandlerTuple)�MatplotlibDeprecationWarning)� rc_contextc C s� t j�d�} t j�d�}dgd dgd }dgd dgd }t�� \}}t| |||�D ]\}}}} |j|||| d� qZ|�� \} }t� t|| ��}|j |�� |�� dd d � d S )N� �a� �b�r�g)�label�c�center left)� � �?)�loc�bbox_to_anchor) �np�randomZrandn�plt�subplots�zip�scatterZget_legend_handles_labels�collections�OrderedDict�legend�values�keys)�X�Y�labels�colors�fig�ax�x�yr �color�handlesr � r) �>/usr/lib/python3/dist-packages/matplotlib/tests/test_legend.py�test_legend_ordereddict s �r+ Zlegend_auto1T)�baseline_images�remove_textc C sX t �� } | �d�}t�d�}|j|d| ddd� |j||d ddd� |jdd � d S )�Test automatic legend placement�o �d �2 �o�y=1�r �y=-1�best�r N)r �figure�add_subplotr �arange�plotr )r# r$ r% r) r) r* �test_legend_auto1% s r<