| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/matplotlib/__pycache__/ |
Upload File : |
o
�:�a�o � @ s� d Z ddlZddlZddlmZ ddlZddlZddlm Z m
Z
mZmZ ddl
mZ e�e�ZG dd� d�ZG dd � d e�ZG d
d� de�ZG dd
� d
�ZdS )a�
:mod:`~matplotlib.gridspec` contains classes that help to layout multiple
`~.axes.Axes` in a grid-like pattern within a figure.
The `GridSpec` specifies the overall grid structure. Individual cells within
the grid are referenced by `SubplotSpec`\s.
Often, users need not access this module directly, and can use higher-level
methods like `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` and
`~.Figure.subfigures`. See the tutorial
:doc:`/tutorials/intermediate/arranging_axes` for a guide.
� N)�Integral)�_api�_pylab_helpers�tight_layout�rcParams)�Bboxc @ s� e Zd ZdZd'dd�Zdd� Zedd� d d
�Zedd� dd
�Zd
d� Z d(dd�Z
d)dd�Zdd� Zdd� Z
dd� Zdd� Zd*dd�Zedd � �Zd!d"� Zddd#dd$�d%d&�ZdS )+�GridSpecBasezm
A base class of GridSpec that specifies the geometry of the grid
that a subplot will be placed.
Nc C sf t |t�r |dkrtd|����t |t�r|dkr td|����||| _| _| �|� | �|� dS )a�
Parameters
----------
nrows, ncols : int
The number of rows and columns of the grid.
width_ratios : array-like of length *ncols*, optional
Defines the relative widths of the columns. Each column gets a
relative width of ``width_ratios[i] / sum(width_ratios)``.
If not given, all columns will have the same width.
height_ratios : array-like of length *nrows*, optional
Defines the relative heights of the rows. Each row gets a
relative height of ``height_ratios[i] / sum(height_ratios)``.
If not given, all rows will have the same height.
r z/Number of rows must be a positive integer, not z2Number of columns must be a positive integer, not N)�
isinstancer �
ValueError�_nrows�_ncols�set_height_ratios�set_width_ratios)�self�nrows�ncols�
height_ratios�width_ratios� r �5/usr/lib/python3/dist-packages/matplotlib/gridspec.py�__init__! s ��
zGridSpecBase.__init__c C sb t t| j��dkrd| jf nd}t t| j��dkr d| jf nd}dj| jj| j| j|| d�S )N� z, height_ratios=%r� z, width_ratios=%rz&{clsname}({nrows}, {ncols}{optionals}))�clsnamer r � optionals) �len�set�_row_height_ratios�_col_width_ratios�format� __class__�__name__r r )r �
height_arg� width_argr r r �__repr__: s �����zGridSpecBase.__repr__c C � | j S �N)r �r r r r �<lambda>F � zGridSpecBase.<lambda>zThe number of rows in the grid.)�docc C r% r&