OwlCyberSecurity - MANAGER
Edit File: tight_bbox.cpython-38.pyc
U ��] � @ s0 d Z ddlmZmZmZ ddd�Zd dd�ZdS ) zD This module is to support *bbox_inches* option in savefig command. � )�Bbox�TransformedBbox�Affine2DNc sv �j ��j���� ��jj� ��d� g �g ��jD ]P}|jdd��� }�� |� � � �� |�� � |fdd�}|�|� |� d� q4� ������fdd�}|dk r�t� �|�}|�j }nt� ��j�}d }t||�} t�d d |j|j��_| j| j } }�j j| �j j| }} t�| | || ��j_�j�� t�j|��_ �j�| | || �j j| �j j| � |S )aO Temporarily adjust the figure so that only the specified area (bbox_inches) is saved. It modifies fig.bbox, fig.bbox_inches, fig.transFigure._boxout, and fig.patch. While the figure size changes, the scale of the original figure is conserved. A function which restores the original values are returned. F)Zoriginalc S s |S )N� )�a�r�posr r �7/usr/lib/python3/dist-packages/matplotlib/tight_bbox.py�_l! s zadjust_bbox.<locals>._l�autoc sl t �j���D ]\} }}| �|� | �|� q��_��_���� � �j_�j� � �j �dddd� d S )Nr � )�zip�axes� set_aspect�set_axes_locator�bbox�bbox_inches�set_tight_layout�transFigure�_boxout� invalidate�patch� set_bounds)�axZaspZloc�r Zasp_list�figZlocator_listZorigBboxZorigBboxInchesZorig_tight_layoutr r �restore_bbox&