| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/lib/python3.9/dist-packages/matplotlib/__pycache__/ |
Upload File : |
a
���h�� � @ s d Z ddlZddlZddlZddlZddlZddlZddlm Z m
Z
mZmZm
Z
ddlmZmZ ddlmZ ddlmZ ddlmZ ddlmZmZmZmZmZ dd lmZmZm Z m!Z!m"Z"m#Z# dd
l$m%Z% ddl&m'Z'm(Z(m)Z) ddl&m*Z*m+Z+ dd
l,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2 ddl3m4Z4m5Z5m6Z6 ddl7m8Z8 G dd� de.�Z9dZ:dZ;dZ<e;j=dde<dd�e: Z>e
j?j@e>d� dZAe;j=dddeAd�e: ZBe
j?j@eBd� e;j=dd e<eAd�e: ZCe
j?j@eCd!� e;j=dd e<eAd�ZDe
j?j@eDd"� G d#d$� d$e�ZEd,d%d&�ZFd-d'd(�ZGddd)�d*d+�ZHdS ).aT
The legend module defines the Legend class, which is responsible for
drawing legends associated with Axes and/or figures.
.. important::
It is unlikely that you would ever create a Legend instance manually.
Most users would normally create a legend via the `~.Axes.legend`
function. For more details on legends there is also a :ref:`legend guide
<legend_guide>`.
The `Legend` class is a container of legend handles and legend texts.
The legend handler map specifies how to create legend handles from artists
(lines, patches, etc.) in the Axes or figures. Default legend handlers are
defined in the :mod:`~matplotlib.legend_handler` module. While not all artist
types are covered by the default legend handlers, custom legend handlers can be
defined to support arbitrary objects.
See the :ref`<legend_guide>` for more
information.
� N)�_api�
_docstring�cbook�colors� offsetbox)�Artist�allow_rasterization)�silent_list)�FontProperties)�Line2D)�Patch� Rectangle�Shadow�FancyBboxPatch� StepPatch)�
Collection�CircleCollection�LineCollection�PathCollection�PolyCollection�RegularPolyCollection)�Text)�Bbox�BboxBase�TransformedBbox)�BboxTransformTo�BboxTransformFrom)�AnchoredOffsetbox�DraggableOffsetBox�HPacker�VPacker�DrawingArea�TextArea)�ErrorbarContainer�BarContainer�
StemContainer� )�legend_handlerc s6 e Zd Zd� fdd� Zdd� Zdd� Zd d
� Z� ZS )�DraggableLegendF�locc s6 || _ tjddg|d� || _t� j||j|d� dS )a�
Wrapper around a `.Legend` to support mouse dragging.
Parameters
----------
legend : `.Legend`
The `.Legend` instance to wrap.
use_blit : bool, optional
Use blitting for faster image composition. For details see
:ref:`func-animation`.
update : {'loc', 'bbox'}, optional
If "loc", update the *loc* parameter of the legend upon finalizing.
If "bbox", update the *bbox_to_anchor* parameter.
r) �bbox��update)�use_blitN)�legendr �
check_in_list�_update�super�__init__�_legend_box)�selfr. r- r, �� __class__� �;/usr/local/lib/python3.9/dist-packages/matplotlib/legend.pyr2 7 s zDraggableLegend.__init__c C s6 | j dkr| �| �� � n| j dkr2| �| �� � d S )Nr) r* )r0 �_update_locZget_loc_in_canvas�_update_bbox_to_anchor�r4 r7 r7 r8 �finalize_offsetM s
zDraggableLegend.finalize_offsetc C sR | j �� }|jdks|jdkr4| j �d � | j �� }t|�}t|�|��| j _d S )Nr ) r. �get_bbox_to_anchor�width�height�set_bbox_to_anchorr �tuple� transform�_loc)r4 �
loc_in_canvasr* Z_bbox_transformr7 r7 r8 r9 S s
zDraggableLegend._update_locc C s | j jj�|�}| j �|� d S �N)r. �axesZ transAxesrB r@ )r4 rD Zloc_in_bboxr7 r7 r8 r: ] s z&DraggableLegend._update_bbox_to_anchor)Fr) )�__name__�
__module__�__qualname__r2 r<