| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/matplotlib/__pycache__/ |
Upload File : |
�
G8�c� � �~ � d Z ddlZddlmZ ddlmZ ddlZddlZ ddl
mZmZ ddl
mZmZ ddlmZ G d � d
� Zd� Zy)a�
A module for dealing with the polylines used throughout Matplotlib.
The primary class for polyline handling in Matplotlib is `Path`. Almost all
vector drawing makes use of `Path`\s somewhere in the drawing pipeline.
Whilst a `Path` instance itself cannot be drawn, some `.Artist` subclasses,
such as `.PathPatch` and `.PathCollection`, can be used for convenient `Path`
visualisation.
� N)� lru_cache)�WeakValueDictionary� )�_api�_path)�_to_unmasked_float_array�simple_linear_interpolation)�
BezierSegmentc �` � � e Zd ZdZej
Z ed� Z ed� Z ed� Z ed� Z
ed� Z ed� Zedede de
dedediZ
d7d
�Zed8d�� Zed� � Zd
� Zed� � Zej* d� � Zed� � Zej* d� � Zed� � Zej* d� � Zed� � Zej* d� � Zed� � Zd� Zd8� fd� ZeZed� � Zed� � Zd� Zd� Z d9d�Z!d� Z"d:d d dd dd �d!�Z#d"� Z$d;d#�Z%d;d$�Z&d8d%�Z'd8d&�Z(d<d'�Z)d<d(�Z*d)� Z+d=d*�Z,dZ-ed+� � Z. e/� Z0ed,� � Z1 e/� Z2ed>d-�� Z3ed.� � Z4dZ5ed/� � Z6ed?d0�� Z7dZ8ed1� � Z9ed@d2�� Z:ed8d3�� Z;e< e=d4� dAd5�� � Z>d<d6�Z?� xZ@S )B�Pathu�
A series of possibly disconnected, possibly closed, line and curve
segments.
The underlying storage is made up of two parallel numpy arrays:
- *vertices*: an Nx2 float array of vertices
- *codes*: an N-length uint8 array of path codes, or None
These two arrays always have the same length in the first
dimension. For example, to represent a cubic curve, you must
provide three vertices and three ``CURVE4`` codes.
The code types are:
- ``STOP`` : 1 vertex (ignored)
A marker for the end of the entire path (currently not required and
ignored)
- ``MOVETO`` : 1 vertex
Pick up the pen and move to the given vertex.
- ``LINETO`` : 1 vertex
Draw a line from the current position to the given vertex.
- ``CURVE3`` : 1 control point, 1 endpoint
Draw a quadratic Bézier curve from the current position, with the given
control point, to the given end point.
- ``CURVE4`` : 2 control points, 1 endpoint
Draw a cubic Bézier curve from the current position, with the given
control points, to the given end point.
- ``CLOSEPOLY`` : 1 vertex (ignored)
Draw a line segment to the start point of the current polyline.
If *codes* is None, it is interpreted as a ``MOVETO`` followed by a series
of ``LINETO``.
Users of Path objects should not access the vertices and codes arrays
directly. Instead, they should use `iter_segments` or `cleaned` to get the
vertex/code pairs. This helps, in particular, to consistently handle the
case of *codes* being None.
Some behavior of Path objects can be controlled by rcParams. See the
rcParams whose keys start with 'path.'.
.. note::
The vertices and codes arrays should be treated as
immutable -- there are a number of optimizations and assumptions
made up front in the constructor that will not change when the
data changes.
r r � � � �O NFc �P � t |� }t j d|�� |��t j || j
� }|j dk7 st |� t |� k7 r%t d|j � d|j � �� �t |� r�|d | j k7 r�t d| j � d |d � �� �|rbt |� rWt j t |� | j
�
� }| j |d<