|
Server : Apache System : Linux server112.speedpacket.com 3.10.0-962.3.2.lve1.5.36.el7.x86_64 #1 SMP Mon May 18 02:16:06 EDT 2020 x86_64 User : equistyl ( 1341) PHP Version : 8.1.30 Disable Function : NONE Directory : /lib64/python2.7/site-packages/matplotlib/ |
Upload File : |
�
r`]c @ s� d Z d d l m Z d d l Z d d l m Z m Z m Z d � Z d � Z d � Z
d � Z i Z x* d d
d d d
d g D] Z
e e e
<q� Wx$ d d d d g D] Z
e
e e
<q� Wd S( sD
This module is to support *bbox_inches* option in savefig command.
i����( t print_functionN( t Bboxt TransformedBboxt Affine2Dc s � j � � j � � j j � g � g � xu � j D]j } | j d t � j � } � j | j � � � j | j
� � | d � } | j | � | j d � q4 W� � � � � � f d � } t
j | � } | d k r� | � | � | St j d | � d Sd S( sO
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.
t originalc S s | S( N( ( t at rt pos( ( s; /usr/lib64/python2.7/site-packages/matplotlib/tight_bbox.pyt _l s t autoc s� x@ t � j � � � D]) \ } } } | j | � | j | � q W� � _ � � _ � � j _ � j j � � j j
d d d d � d S( Ni i ( t zipt axest
set_aspectt set_axes_locatort bboxt bbox_inchest transFiguret _boxoutt
invalidatet patcht
set_bounds( t axt aspt loc( R t asp_listt figt locator_listt origBboxt origBboxInches( s; /usr/lib64/python2.7/site-packages/matplotlib/tight_bbox.pyt restore_bbox% s %
s9 bbox_inches option for %s backend is not implemented yet.N( R R R R R t get_positiont Falset frozent appendt get_axes_locatort
get_aspectR
R t _adjust_bbox_handler_dt gett Nonet warningst warn( R t formatR R R R R t adjust_bbox_handler( ( R R R R R R s; /usr/lib64/python2.7/site-packages/matplotlib/tight_bbox.pyt adjust_bbox
s(
c C s� | j } t | | � } | j | j } } t j d d | j | j � | _ | j | j } } | j j | j j } } t j | | | | � | j
_ | j
j � t | j | � | _ | j
j | | | | | j j | | j j | � d S( s*
adjust_bbox for png (Agg) format
i N( t dpi_scale_transR t x0t y0R t from_boundst widtht heightR R R R R R R ( R R t trt _bboxR- R. t w1t h1( ( s; /usr/lib64/python2.7/site-packages/matplotlib/tight_bbox.pyt adjust_bbox_png; s
c C s1 | j j j d k r3 t � j | j � } d } n t � j d � } d | j } t | | � } t j d d | j | j
� | _ | j | j
} } | j j | | j j
| } } t j | | | | � | j _ | j j � t | j | � | _ | j j | | | | | j j | | j j
| � d S( s*
adjust_bbox for pdf & eps format
t RendererPgfg �?iH g R@i N( t _cachedRenderert __class__t __name__R t scalet dpiR R R/ R0 R1 R R- R. R R R R R R ( R R R2 t fR3 R- R. R4 R5 ( ( s; /usr/lib64/python2.7/site-packages/matplotlib/tight_bbox.pyt adjust_bbox_pdfU s"