Ñò „ñ™Jc @ sV d Z d d k Z d d k l Z l Z l Z d „ Z d „ Z d „ Z d „ Z d S( sD This module is to support *bbox_inches* option in savefig command. iÿÿÿÿN( t Bboxt TransformedBboxt Affine2Dc s ˆ i ‰ ˆ i ‰ ˆ i i ‰ g ‰ g ‰ xu ˆ i D]j } | i d t ƒ i ƒ } ˆ i | i ƒ ƒ ˆ i | i ƒ ƒ | d „ } | i | ƒ | i d ƒ q4 W‡ ‡ ‡ ‡ ‡ ‡ f d † } | d j o t ˆ | ƒ | S| d j o t ˆ | ƒ | St i d | ƒ d Sd S( sP 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 whitch restores the original values are returned. t originalc S s | S( N( ( t at rt pos( ( s; /usr/lib64/python2.6/site-packages/matplotlib/tight_bbox.pyt _l s t autoc s‹ x@ t ˆ i ˆ ˆ ƒ D]) \ } } } | i | ƒ | i | ƒ q Wˆ ˆ _ ˆ ˆ _ ˆ ˆ i _ ˆ i i ƒ ˆ i i 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( t origBboxInchest locator_listt origBboxt asp_listt figR ( s; /usr/lib64/python2.6/site-packages/matplotlib/tight_bbox.pyt restore_bbox% s t pngt rawt rgbat pdft epst svgt svgzs9 bbox_inches option for %s backend is not implemented yet.N( R R R ( R R! R" R# ( R R R R R t get_positiont Falset frozent appendt get_axes_locatort get_aspectR R t adjust_bbox_pngt adjust_bbox_pdft warningst warnt None( R t formatR R R R R ( ( R R R R R R s; /usr/lib64/python2.6/site-packages/matplotlib/tight_bbox.pyt adjust_bbox s, c C só | i } t | | ƒ } | i | i } } t i d d | i | i ƒ | _ | i | i } } | i i | i i } } t i | | | | ƒ | i _ | i i ƒ t | i | ƒ | _ | i i | | | | | i i | | i i | ƒ 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 _bboxR2 R3 t w1t h1( ( s; /usr/lib64/python2.6/site-packages/matplotlib/tight_bbox.pyR* <