| 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 ddlZddlZddlmZmZ ddlmZ ddl
mZ ddl
mZ ddlmZ ddlmZ ddlmZ ddlmZmZmZ ddlmZmZmZ dZd � Zd+d
�Z d,d�Z! G d� d
e jD � Z# G d� de#� Z$ G d� de$� Z% G d� de$� Z& G d� de#� Z' G d� de#� Z( G d� de#� Z) G d� de#� Z* G d� de#� Z+d� Z, G d� d e+� Z- G d!� d"e#� Z. G d#� d$e jD ej^ � Z0 G d%� d&� Z1 G d'� d(e1� Z2 G d)� d*e1� Z3y)-ac
Container classes for `.Artist`\s.
`OffsetBox`
The base of all container artists defined in this module.
`AnchoredOffsetbox`, `AnchoredText`
Anchor and align an arbitrary `.Artist` or a text relative to the parent
axes or a specific anchor point.
`DrawingArea`
A container with fixed width and height. Children have a fixed position
inside the container and may be clipped.
`HPacker`, `VPacker`
Containers for layouting their children vertically or horizontally.
`PaddedBox`
A container to add a padding around an `.Artist`.
`TextArea`
Contains a single `.Text` instance.
� N)�_api�
_docstring)�FontProperties)� BboxImage)�FancyBboxPatch�FancyArrowPatch�bbox_artist)�Bbox�BboxBase�TransformedBboxFc �( � t rt | i |�� y y �N)�DEBUG�mbbox_artist)�args�kwargss �6/usr/lib/python3/dist-packages/matplotlib/offsetbox.pyr r , s � ���d�%�f�%�
� c � � t | � \ }}t j g d�|�� |dk( r=t j dg|D �cg c] }||z �� c}z � }|dd }|�|d |z
}||fS |dk( re|�d}t |� dkD r|t
|� z
t |� dz
z }nd}t j dg|D �cg c] }||z �� c}z � }|dd }||fS |d k( ret |� } |�|�t d
� �| |z t |� z }n|t |� z | z
}| |z t j t |� � z }||fS yc c}w c c}w )a�
Pack boxes specified by their ``(width, xdescent)`` pair.
For simplicity of the description, the terminology used here assumes a
horizontal layout, but the function works equally for a vertical layout.
*xdescent* is analogous to the usual descent, but along the x-direction; it
is currently ignored.
There are three packing *mode*\s:
- 'fixed': The elements are packed tight to the left with a spacing of
*sep* in between. If *total* is *None* the returned total will be the
right edge of the last box. A non-*None* total will be passed unchecked
to the output. In particular this means that right edge of the last
box may be further to the right than the returned total.
- 'expand': Distribute the boxes with equal spacing so that the left edge
of the first box is at 0, and the right edge of the last box is at
*total*. The parameter *sep* is ignored in this mode. A total of *None*
is accepted and considered equal to 1. The total is returned unchanged
(except for the conversion *None* to 1). If the total is smaller than
the sum of the widths, the laid out boxes will overlap.
- 'equal': If *total* is given, the total space is divided in N equal
ranges and each box is left-aligned within its subspace.
Otherwise (*total* is *None*), *sep* must be provided and each box is
left-aligned in its subspace of width ``(max(widths) + sep)``. The
total width is then calculated to be ``N * (max(widths) + sep)``.
Parameters
----------
wd_list : list of (float, float)
(width, xdescent) of boxes to be packed.
total : float or None
Intended total length. *None* if not used.
sep : float
Spacing between boxes.
mode : {'fixed', 'expand', 'equal'}
The packing mode.
Returns
-------
total : float
The total width needed to accommodate the laid out boxes.
offsets : array of float
The left offsets of the boxes.
)�fixed�expand�equal)�moder r N���r � r z@total and sep cannot both be None when using layout mode 'equal')
�zipr �
check_in_list�np�cumsum�len�sum�max�
ValueError�arange)
�wd_list�total�sepr �w_list�d_list�w�offsets_�offsets�maxhs
r �_get_packed_offsetsr. 1 ss � �b �'�]�N�F�F����3�$�?��w���9�9�a�S�V�#<��A��G�#<�<�=���3�B�-���=��R�L�3�&�E��g�~��
�� � �=��E��v�;��?��3�v�;�&�3�v�;��?�;�C��C��9�9�a�S�V�#<��A��G�#<�<�=���3�B�-���g�~��
����6�{���=��{� � "=� >� >��C�Z�3�v�;�.�E��#�f�+�%��,�C��#�:����3�v�;�!7�7���g�~��
��'