| 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 ddlZddlZddlmZmZ ddlZddlZddl Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZ ddlmZmZ e�ddgd d
gddgg d
�ddgdgd��G dd� dejej ��Z!G dd� de!�Z"G dd� de"�Z#G dd� de"�Z$G dd� de"�Z%G dd� de%�Z&G dd� de%�Z'G d d!� d!e!�Z(G d"d#� d#e(�Z)G d$d%� d%e"�Z*G d&d'� d'e!�Z+G d(d)� d)e!�Z,G d*d+� d+e!�Z-G d,d-� d-�Z.G d.d/� d/e.e!�Z/G d0d1� d1e.e$�Z0dS )2ay
Classes for the efficient drawing of large collections of objects that
share most properties, e.g., a large number of line segments or
polygons.
The classes are not meant to be as flexible as their single element
counterparts (e.g., you may not be able to select all line styles) but
they are meant to be fast for common use cases (e.g., a large set of solid
line segments).
� N)�Number�Real� )�_api�_path�artist�cbook�cm�colors�
_docstring�hatch�lines�path�
transforms)� JoinStyle�CapStyle�antialiaseds�aa�
edgecolors�ec�
facecolors�fc)�
linestyles�dashes�ls�
linewidths�lwZtransOffset)�antialiasedZ edgecolorZ facecolor� linestyle� linewidth�offset_transformc @ s� e Zd ZdZe�d�ZdZej dddddddddddddddd�d d
��Z
dd� Zd
d� Zdd� Z
dd� Zdd� Zdd� Zdedd�Zdd� Zejdd� �Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� Z d3d4� Z!ej d5d6� �Z"ej d7d8� �Z#ej d9d:� �Z$ej d;d<� �Z%e&d=d>� �Z'd?d@� Z(dAdB� Z)dCdD� Z*dEdF� Z+dGdH� Z,dIdJ� Z-dKdL� Z.dMdN� Z/dOdP� Z0dQdR� Z1dSdT� Z2dUdV� Z3dWdX� Z4ej5j6je4_dYdZ� Z7d[d\� Z8d]d^� Z9d_d`� Z:dadb� Z;dcdd� Z<dS )f�
Collectiona�
Base class for Collections. Must be subclassed to be usable.
A Collection represents a sequence of `.Patch`\es that can be drawn
more efficiently together than individually. For example, when a single
path is being drawn repeatedly at different offsets, the renderer can
typically execute a ``draw_marker()`` call much more efficiently than a
series of repeated calls to ``draw_path()`` with the offsets put in
one-by-one.
Most properties of a collection can be configured per-element. Therefore,
Collections have "plural" versions of many of the properties of a `.Patch`
(e.g. `.Collection.get_paths` instead of `.Patch.get_path`). Exceptions are
the *zorder*, *hatch*, *pickradius*, *capstyle* and *joinstyle* properties,
which can only be set globally for the whole collection.
Besides these exceptions, all properties can be specified as single values
(applying to all elements) or sequences of values. The property of the
``i``\th element of the collection is::
prop[i % len(prop)]
Each Collection can optionally be used as its own `.ScalarMappable` by
passing the *norm* and *cmap* parameters to its constructor. If the
Collection's `.ScalarMappable` matrix ``_A`` has been set (via a call
to `.Collection.set_array`), then at draw time this internal scalar
mappable will be used to set the ``facecolors`` and ``edgecolors``,
ignoring those that were manually passed in.
�r � r# FN�solidg @r )r r r r �capstyle� joinstyler �offsetsr �norm�cmap�
pickradiusr �urls�zorderc K sD t j�| � tj�| |
|� dg| _dg| _dg| _dg| _d| _ d| _
d| _d| _t
�tjd �| _| �|� | �|� | �|� | �|� | �|� | �|� | �|� | �|
� | �|� |r�| �|� nd| _|r�| �|� nd| _|du�rt� |t!�}|j"dk�r|ddd�f }|| _#| | _$d| _%| �&|� d| _'dS )a�
Parameters
----------
edgecolors : :mpltype:`color` or list of colors, default: :rc:`patch.edgecolor`
Edge color for each patch making up the collection. The special
value 'face' can be passed to make the edgecolor match the
facecolor.
facecolors : :mpltype:`color` or list of colors, default: :rc:`patch.facecolor`
Face color for each patch making up the collection.
linewidths : float or list of floats, default: :rc:`patch.linewidth`
Line width for each patch making up the collection.
linestyles : str or tuple or list thereof, default: 'solid'
Valid strings are ['solid', 'dashed', 'dashdot', 'dotted', '-',
'--', '-.', ':']. Dash tuples should be of the form::
(offset, onoffseq),
where *onoffseq* is an even length tuple of on and off ink lengths
in points. For examples, see
:doc:`/gallery/lines_bars_and_markers/linestyles`.
capstyle : `.CapStyle`-like, default: :rc:`patch.capstyle`
Style to use for capping lines for all paths in the collection.
Allowed values are %(CapStyle)s.
joinstyle : `.JoinStyle`-like, default: :rc:`patch.joinstyle`
Style to use for joining lines for all paths in the collection.
Allowed values are %(JoinStyle)s.
antialiaseds : bool or list of bool, default: :rc:`patch.antialiased`
Whether each patch in the collection should be drawn with
antialiasing.
offsets : (float, float) or list thereof, default: (0, 0)
A vector by which to translate each patch after rendering (default
is no translation). The translation is performed in screen (pixel)
coordinates (i.e. after the Artist's transform is applied).
offset_transform : `~.Transform`, default: `.IdentityTransform`
A single transform which will be applied to each *offsets* vector
before it is used.
cmap, norm
Data normalization and colormapping parameters. See
`.ScalarMappable` for a detailed description.
hatch : str, optional
Hatching pattern to use in filled paths, if any. Valid strings are
['/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*']. See
:doc:`/gallery/shapes_and_collections/hatch_style_reference` for
the meaning of each hatch type.
pickradius : float, default: 5.0
If ``pickradius <= 0``, then `.Collection.contains` will return
``True`` whenever the test point is inside of one of the polygons
formed by the control points of a Path in the Collection. On the
other hand, if it is greater than 0, then we instead check if the
test point is contained in a stroke of width ``2*pickradius``
following any of the Paths in the Collection.
urls : list of str, default: None
A URL for each patch to link to once drawn. Currently only works
for the SVG backend. See :doc:`/gallery/misc/hyperlinks_sgskip` for
examples.
zorder : float, default: 1
The drawing order, shared by all Patches in the Collection. See
:doc:`/gallery/misc/zorder_demo` for all defaults and examples.
**kwargs
Remaining keyword arguments will be used to set properties as
``Collection.set_{key}(val)`` for each key-value pair in *kwargs*.
�r Nr Nzhatch.color�� )(r �Artist�__init__r �ScalarMappable�_us_linestyles�_linestyles�_us_lw�_linewidths� _gapcolor�_face_is_mapped�_edge_is_mapped�_mapped_colors�mcolors�to_rgba�mpl�rcParams�_hatch_color�
set_facecolor�
set_edgecolor�
set_linewidth�
set_linestyle�set_antialiased�set_pickradius�set_urls� set_hatchZ
set_zorder�set_capstyle� _capstyle�
set_joinstyle�
_joinstyle�np�
asanyarray�float�shape�_offsets�_offset_transformZ
_path_effectsZ_internal_update�_paths)�selfr r r r r% r&