HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyo
�
�)�Uc@s�dZddlZddlZddlmZmZddlmZmZm	Z	ddl
mZmZm
Z
mZmZddlZddlZddlmZddlmZddlmZdd	lmZmZdd
lmZddlmZm Z m!Z!m"Z"ddl#m$Z$m%Z%m&Z&dd
l'm(Z(m)Z)ddl*j
Z
ddlm+Z+ddl,m-Z-e+j.j/de%��dfd��YZ0defd��YZ1d�Z2e+j.j/dej3e1��dS(s5
The figure module provides the top-level
:class:`~matplotlib.artist.Artist`, the :class:`Figure`, which
contains all the plot elements.  The following classes are defined

:class:`SubplotParams`
    control the default spacing of the subplots

:class:`Figure`
    top level container for all plot elements


i����N(tArtisttallow_rasterization(tAxestSubplotBasetsubplot_class_factory(tflattentallequaltStacktiterabletis_string_like(tFigureImage(trcParams(t	Rectangle(tTextt_process_text_args(tLegend(tAffine2DtBboxtBboxTransformTotTransformedBbox(tprojection_factorytget_projection_namestget_projection_class(tBlockingMouseInputtBlockingKeyMouseInput(t	docstring(t
itemgettertprojection_namest
SubplotParamscBsMeZdZddddddd�Zddddddd�Zd�ZRS(s6
    A class to hold the parameters for a subplot
    cCs)t|_|j||||||�dS(s�
        All dimensions are fraction of the figure width or height.
        All values default to their rc params

        The following attributes are available

        *left*  = 0.125
            the left side of the subplots of the figure
        *right* = 0.9
            the right side of the subplots of the figure
        *bottom* = 0.1
            the bottom of the subplots of the figure
        *top* = 0.9
            the top of the subplots of the figure
        *wspace* = 0.2
            the amount of width reserved for blank space between subplots
        *hspace* = 0.2
            the amount of height reserved for white space between subplots
        *validate*
            make sure the params are in a legal state (*left*<*right*, etc)
        N(tTruetvalidatetupdate(tselftlefttbottomtrightttoptwspacethspace((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt__init__,s	csMt�dd
��t�dd
��t�dd
��t�dd
��t�dd
��t�dd
���jd|��jd|��jd|��jd|��jd|��jd|��������fd�}�jrI�j�jkr|�td��n�j�jkrI|�td	��qInd
S(s�
        Update the current values.  If any kwarg is None, default to
        the current value, if set, otherwise to rc

        R!R#R$R"R%R&cs:��_��_��_��_��_��_dS(N(R!R#R$R"R%R&((R t
thisbottomt
thishspacetthisleftt	thisrighttthistopt
thiswspace(sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytreset^s					sleft cannot be >= rightsbottom cannot be >= topN(	tgetattrtNonet_update_thisRR!R#t
ValueErrorR"R$(R R!R"R#R$R%R&R.((R R(R)R*R+R,R-sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyRGs(!	cCsX|dkrDt||d�}|dkrDd|}t|}qDnt|||�dS(Nsfigure.subplot.(R0R/Rtsetattr(R tstvaltkey((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR1qs
N(t__name__t
__module__t__doc__R0R'RR1(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR(s)tFigurec	BsWeZdZd�Zd:d:d:d:ded:d�Zd�Zd�Ze	ee�Z
dddd	�Zd
�Zd�Z
d�Zd
�Zd�Zd:d�Zddd:d:d:d:d:d:d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z!d!�Z"e#j$d"��Z%e#j$d#��Z&e'd$�Z(d%�Z)e*d&��Z+d'�Z,d(�Z-d)�Z.e#j$d*��Z/d+�Z0e#j$d,��Z1d-�Z2d.�Z3d/�Z4d0�Z5e#j$d:d:d1��Z6d2�Z7d3ded3d4d5d6�Z8d7d8�Z9d9�Z:RS(;s�
    The Figure instance supports callbacks through a *callbacks*
    attribute which is a :class:`matplotlib.cbook.CallbackRegistry`
    instance.  The events you can connect to are 'dpi_changed', and
    the callback will be called with ``func(fig)`` where fig is the
    :class:`Figure` instance.

    The figure patch is drawn by a the attribute

    *patch*
       a :class:`matplotlib.patches.Rectangle` instance

    *suppressComposite*
       for multiple figure images, the figure will make composite
       images depending on the renderer option_image_nocomposite
       function.  If suppressComposite is True|False, this will
       override the renderer
    cCsdt|jj�S(Ns
Figure(%gx%g)(ttupletbboxtsize(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt__str__�sg�?c
Cs�tj|�tjd�|_|dkr8td}n|dkrQtd}n|dkrjtd}n|dkr�td}nt�|_||_	t
jdd|�|_t
|j|j�|_||_t|j�|_tdddd	d
d	d|d|d
|�|_|_|j|j�td|_d|_|dkrXt�}n||_t�|_g|_|j�d|_dS(s&
        *figsize*
            w,h tuple in inches
        *dpi*
            dots per inch
        *facecolor*
            the figure patch facecolor; defaults to rc ``figure.facecolor``
        *edgecolor*
            the figure patch edge color; defaults to rc ``figure.edgecolor``
        *linewidth*
            the figure patch edge linewidth; the default linewidth of the frame
        *frameon*
            if False, suppress drawing the figure frame
        *subplotpars*
            a :class:`SubplotParams` instance, defaults to rc
        tdpi_changedsfigure.figsizes
figure.dpisfigure.facecolorsfigure.edgecoloritxytwidthitheightt	facecolort	edgecolort	linewidths	axes.holdN(R?(ii(RR'tcbooktCallbackRegistryt	callbacksR0RRtdpi_scale_transtdpiRtfrom_boundstbbox_inchesRR<tframeonRttransFigureRtpatchtfigurePatcht_set_artist_propst_holdtcanvasRtsubplotparsRt_axstacktaxestclft_cachedRenderer(R tfigsizeRJRCRDRERMRT((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR'�s<




		
			
cCs|jS(N(t_dpi(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt_get_dpi�scCs9||_|jj�j||�|jjd|�dS(NR?(RZRItcleartscaleRHtprocess(R RJ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt_set_dpi�s	g�������?iR#cCs%tjg|jD]}t|d�^q�}t|j�dkrwx�|j�D] }|j|�|j|�qPWn�|rx�|j�D]w}|j	�r�xb|j�D] }|j|�|j|�q�Wq�x!|j�D]}|j
t�q�W|jd�q�Wn|r!|j
d|�ndS(s]
        Date ticklabels often overlap, so it is useful to rotate them
        and right align them.  Also, a common use case is a number of
        subplots with shared xaxes where the x-axis is date data.  The
        ticklabels are often long, and it helps to rotate them on the
        bottom subplot and turn them off on other subplots, as well as
        turn off xlabels.

        *bottom*
            the bottom of the subplots for :meth:`subplots_adjust`
        *rotation*
            the rotation of the xtick labels
        *ha*
            the horizontal alignment of the xticklabels
        tis_last_rowitR"N(tnptalltrueRVthasattrtlentget_xticklabelstset_hatset_rotationtget_axesR`tset_visibletFalset
set_xlabeltsubplots_adjust(R R"trotationthataxtallsubplotstlabel((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt
autofmt_xdate�s .

cCs�|jg}|j|j�|j|j�|j|j�|j|j�|j|j�|j|j�|j|j�|S(s-get a list of artists contained in the figure(	ROtextendtartistsRVtlinestpatchesttextstimagestlegends(R tchildren((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytget_children�scCsDt|j�r|j||�S|jj|j|j�}|ifS(s_
        Test whether the mouse event occurred on the figure.

        Returns True,{}
        (tcallablet	_containsR<tcontainstxty(R t
mouseeventtinside((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR
scOs|jS(s=get the figure bounding box in display space; kwargs are void(R<(R targstkwargs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytget_window_extentscKs�|jdd�}|jdd�}d|krId|krId|d<nd|krnd	|krnd
|d<n|j||||�}|S(s�
        Add a centered title to the figure.

        kwargs are :class:`matplotlib.text.Text` properties.  Using figure
        coordinates, the defaults are:

          - *x* = 0.5
              the x location of text in figure coords

          - *y* = 0.98
              the y location of the text in figure coords

          - *horizontalalignment* = 'center'
              the horizontal alignment of the text

          - *verticalalignment* = 'top'
              the vertical alignment of the text

        A :class:`matplotlib.text.Text` instance is returned.

        Example::

          fig.suptitle('this is the figure title', fontsize=12)
        R�g�?R�g\��(\�?thorizontalalignmentRotcentertverticalalignmenttvaR$(tpopttext(R ttR�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytsuptitles

cCs
||_dS(sb
        Set the canvas the contains the figure

        ACCEPTS: a FigureCanvas instance
        N(RS(R RS((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt
set_canvas>scCs)|dkr|j|_n	||_dS(s

        Set the hold state.  If hold is None (default), toggle the
        hold state.  Else set the hold state to boolean value b.

        Eg::

            hold()      # toggle hold
            hold(True)  # hold is on
            hold(False) # hold is off
        N(R0RR(R tb((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytholdFsic
Ks�|js|j�nt||||||	|
�}|j|�|j|�|dkrm|j||�n|jj|�|S(s�
        call signatures::

          figimage(X, **kwargs)

        adds a non-resampled array *X* to the figure.

        ::

          figimage(X, xo, yo)

        with pixel offsets *xo*, *yo*,

        *X* must be a float array:

        * If *X* is MxN, assume luminance (grayscale)
        * If *X* is MxNx3, assume RGB
        * If *X* is MxNx4, assume RGBA

        Optional keyword arguments:

          =========   ==========================================================
          Keyword     Description
          =========   ==========================================================
          xo or yo    An integer, the *x* and *y* image offset in pixels
          cmap        a :class:`matplotlib.cm.ColorMap` instance, eg cm.jet.
                      If None, default to the rc ``image.cmap`` value
          norm        a :class:`matplotlib.colors.Normalize` instance. The
                      default is normalization().  This scales luminance -> 0-1
          vmin|vmax   are used to scale a luminance image to 0-1.  If either is
                      None, the min and max of the luminance values will be
                      used.  Note if you pass a norm instance, the settings for
                      *vmin* and *vmax* will be ignored.
          alpha       the alpha blending value, default is None
          origin      [ 'upper' | 'lower' ] Indicates where the [0,0] index of
                      the array is in the upper left or lower left corner of
                      the axes. Defaults to the rc image.origin value
          =========   ==========================================================

        figimage complements the axes image
        (:meth:`~matplotlib.axes.Axes.imshow`) which will be resampled
        to fit the current axes.  If you want a resampled image to
        fill the entire figure, you can define an
        :class:`~matplotlib.axes.Axes` with size [0,1,0,1].

        An :class:`matplotlib.image.FigureImage` instance is returned.

        .. plot:: mpl_examples/pylab_examples/figimage_demo.py


        Additional kwargs are Artist kwargs passed on to
        :class:`~matplotlib.image.FigureImage`
        N(	RRRWR
t	set_arrayt	set_alphaR0tset_climRytappend(R tXtxotyotalphatnormtcmaptvmintvmaxtoriginR�tim((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytfigimageTs@	


c
Os�|jdt�}t|�dkr7|d\}}n|\}}|j}||f|j_|r�|j}||}||}t|jdd�}	|	dk	r�|	j	t
|�t
|��q�ndS(s�
        set_size_inches(w,h, forward=False)

        Set the figure size in inches

        Usage::

             fig.set_size_inches(w,h)  # OR
             fig.set_size_inches((w,h) )

        optional kwarg *forward=True* will cause the canvas size to be
        automatically updated; eg you can resize the figure window
        from the shell

        ACCEPTS: a w,h tuple with w,h in inches
        tforwardiitmanagerN(tgetRkReRJRLtp1R/RSR0tresizetint(
R R�R�R�twthtdpivaltcanvaswtcanvashR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytset_size_inches�s		

cCs
|jjS(N(RLR�(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytget_size_inches�scCs
|jj�S(s*Get the edge color of the Figure rectangle(ROt
get_edgecolor(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��scCs
|jj�S(s*Get the face color of the Figure rectangle(ROt
get_facecolor(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��scCs
|jjS(sReturn the figwidth as a float(RLRA(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytget_figwidth�scCs
|jjS(sReturn the figheight as a float(RLRB(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt
get_figheight�scCs|jS(sReturn the dpi as a float(RJ(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytget_dpi�scCs|jS(s"get the boolean indicating frameon(RM(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytget_frameon�scCs|jj|�dS(sv
        Set the edge color of the Figure rectangle

        ACCEPTS: any matplotlib color - see help(colors)
        N(ROt
set_edgecolor(R tcolor((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��scCs|jj|�dS(sv
        Set the face color of the Figure rectangle

        ACCEPTS: any matplotlib color - see help(colors)
        N(ROt
set_facecolor(R R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��scCs
||_dS(sM
        Set the dots-per-inch of the figure

        ACCEPTS: float
        N(RJ(R R5((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytset_dpi�scCs||j_dS(sO
        Set the width of the figure in inches

        ACCEPTS: float
        N(RLtx1(R R5((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytset_figwidth�scCs||j_dS(sP
        Set the height of the figure in inches

        ACCEPTS: float
        N(RLty1(R R5((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt
set_figheight�scCs
||_dS(so
        Set whether the figure frame (background) is displayed or invisible

        ACCEPTS: boolean
        N(RM(R R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytset_frameonscCs�|jj|�|jj|�g}x6|jj�D]%\}}||kr6|j|=q6q6Wx|jD]}||�qiWdS(s4remove a from the figure and update the current axesN(RVtremoveRUt_seentitemst_axobservers(R tatkeysR6tthisaxtfunc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytdelaxesscOs4d�}d�}||�||j��f}|S(s*make a hashable key out of args and kwargscSsUg}xB|D]:\}}t|�r4t|�}n|j||f�q
Wt|�S(N(RR;R�(R�trettktv((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytfixitemsscSsIg}x6|D].}t|�r.t|�}n|j|�q
Wt|�S(N(RR;R�(R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytfixlist#s
(R�(R R�R�R�R�R6((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt	_make_keys			c	Os.|j||�}||jkr?|j|}|j|�|St|�sOdSt|dt�ro|d}n�|d}|jdt�}|jdd�}|r�|dk	r�|dkr�t	dd|��nd}nt
||||�}|jj|�|j
j|�|j|�||j|<|S(sW
        Add an a axes with axes rect [*left*, *bottom*, *width*,
        *height*] where all quantities are in fractions of figure
        width and height.  kwargs are legal
        :class:`~matplotlib.axes.Axes` kwargs plus *projection* which
        sets the projection type of the axes.  (For backward
        compatibility, ``polar=True`` may also be provided, which is
        equivalent to ``projection='polar'``).  Valid values for
        *projection* are: %(projection_names)s.  Some of these projections support
        additional kwargs, which may be provided to :meth:`add_axes`::

            rect = l,b,w,h
            fig.add_axes(rect)
            fig.add_axes(rect, frameon=False, axisbg='g')
            fig.add_axes(rect, polar=True)
            fig.add_axes(rect, projection='polar')
            fig.add_axes(ax)   # add an Axes instance

        If the figure already has an axes with the same parameters,
        then it will simply make that axes current and return it.  If
        you do not want this behavior, eg. you want to force the
        creation of a new axes, you must use a unique set of args and
        kwargs.  The axes :attr:`~matplotlib.axes.Axes.label`
        attribute has been exposed for this purpose.  Eg., if you want
        two axes that are otherwise identical to be added to the
        figure, make sure you give them unique labels::

            fig.add_axes(rect, label='axes1')
            fig.add_axes(rect, label='axes2')

        The :class:`~matplotlib.axes.Axes` instance will be returned.

        The following kwargs are supported:

        %(Axes)s
        Nitpolart
projections!polar=True, yet projection='%s'. s/Only one of these arguments should be supplied.(R�R�tscaRet
isinstanceRR�RkR0R2RRVR�RUtpush(	R R�R�R6RpR�trecttispolarR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytadd_axes-s4'



	

c	Osq|j�}t|�sdSt|dt�r<|d}n|jdt�}|jdd�}|r�|dk	r�|dkr�tdd|��nd}nt|�}|j	||�}||j
kr|j
|}t||�r�|j|�|S|jj
|�|jj
|�nt|�|||�}||j
|<|jj|�|jj|�|j|�|S(sO
        Add a subplot.  Examples:

            fig.add_subplot(111)
            fig.add_subplot(1,1,1)            # equivalent but more general
            fig.add_subplot(212, axisbg='r')  # add subplot with red background
            fig.add_subplot(111, polar=True)  # add a polar subplot
            fig.add_subplot(sub)              # add Subplot instance sub

        *kwargs* are legal :class:`!matplotlib.axes.Axes` kwargs plus
        *projection*, which chooses a projection type for the axes.
        (For backward compatibility, *polar=True* may also be
        provided, which is equivalent to *projection='polar'*). Valid
        values for *projection* are: %(projection_names)s.  Some of these projections
        support additional *kwargs*, which may be provided to
        :meth:`add_axes`.

        The :class:`~matplotlib.axes.Axes` instance will be returned.

        If the figure already has a subplot with key (*args*,
        *kwargs*) then it will simply make that subplot current and
        return it.

        The following kwargs are supported:

        %(Axes)s
        NiR�R�s!polar=True, yet projection='%s'. s/Only one of these arguments should be supplied.(tcopyReR�RR�RkR0R2RR�R�R�RVR�RURR�R�(	R R�R�R�R�R�tprojection_classR6Rp((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytadd_subplotss<
	



cCs�d|_tjd�|_x.t|j�D]}|j�|j|�q+Wt	|j
dd�}|dk	rz|j�n|jj
�i|_g|_g|_g|_g|_g|_g|_|s�g|_ndS(s�
        Clear the figure.

        Set *keep_observers* to True if, for example,
        a gui widget is tracking the axes in the figure.
        R?ttoolbarN(sdpi_changed(R0tsuppressCompositeRFRGRHR;RVtclaR�R/RSRRUR\R�RuRvRwRxRyRzR�(R tkeep_observersRpR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyRW�s$	


							cCs|j�dS(s9
        Clear the figure -- synonym for fig.clf
        N(RW(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR\�sc
sP�j�sdS�jd��jr9�jj��ng}x3�jD](}|j|j�|j�gf�qIWx3�jD](}|j|j�|j�gf�qWx3�j	D](}|j|j�|j�gf�q�W�j
�}�jdk	r�j}nt
�j�dksI|sItg�jD]��j^q0�r�x��jD](}|j|j�|j�gf�qSWn��j�}g�jD]$��j|��j�jf^q�}tj�jj|�jj||��t�_�jj\��}}�����fd�}	|j�jdj�|	gf�x3�jD](}|j|j�|j�gf�qTWx3�jD](}|j|j�|j�gf�q�Wx3�jD](}|j|j�|j�gf�q�W|j dt!d��x!|D]\}
}}||�q	W�j"d���_#�j$j%��dS(sj
        Render the figure using :class:`matplotlib.backend_bases.RendererBase` instance renderer
        NtfigureicsS�j�}|j�j�|j�j���j|����|j�dS(N(tnew_gctset_clip_rectangleR<t
set_clip_patht
get_clip_patht
draw_imagetrestore(tgc(R�R�tltrendererR (sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytdraw_composites
iR6(&tget_visiblet
open_groupRMROtdrawRwR�t
get_zorderRvRutoption_image_nocompositeR�R0ReRyRR�tget_image_magnificationt
make_imagetoxtoyt_imagetfrom_imagesR<RBRARktis_grayscaletboundsRVRxRztsortRtclose_groupRXRSt
draw_event(
R R�tdsuR�t
not_compositetmagtimsR�R�R�tzorderR�R�((R�R�R�R�R sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��sR
	&&&&)1
		#&&&
	cCs|j|j�dS(s�
        draw :class:`matplotlib.artist.Artist` instance *a* only --
        this is available only after the figure is drawn
        N(R�RX(R R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytdraw_artist&scCs|jS(N(RV(R ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyRi.scOs8t|�}t|||||�}|jj|�|S(s2

        Place a legend in the figure.  Labels are a sequence of
        strings, handles is a sequence of
        :class:`~matplotlib.lines.Line2D` or
        :class:`~matplotlib.patches.Patch` instances, and loc can be a
        string or an integer specifying the legend location

        USAGE::

          legend( (line1, line2, line3),
                  ('label1', 'label2', 'label3'),
                  'upper right')

        The *loc* location codes are::

          'best' : 0,          (currently not supported for figure legends)
          'upper right'  : 1,
          'upper left'   : 2,
          'lower left'   : 3,
          'lower right'  : 4,
          'right'        : 5,
          'center left'  : 6,
          'center right' : 7,
          'lower center' : 8,
          'upper center' : 9,
          'center'       : 10,

        *loc* can also be an (x,y) tuple in figure coords, which
        specifies the lower left of the legend box.  figure coords are
        (0,0) is the left, bottom of the figure and 1,1 is the right,
        top.

        Keyword arguments:

          *prop*: [ None | FontProperties | dict ]
            A :class:`matplotlib.font_manager.FontProperties`
            instance. If *prop* is a dictionary, a new instance will be
            created with *prop*. If *None*, use rc settings.

          *numpoints*: integer
            The number of points in the legend line, default is 4

          *scatterpoints*: integer
            The number of points in the legend line, default is 4

          *scatteroffsets*: list of floats
            a list of yoffsets for scatter symbols in legend

          *markerscale*: [ None | scalar ]
            The relative size of legend markers vs. original. If *None*, use rc
            settings.

          *fancybox*: [ None | False | True ]
            if True, draw a frame with a round fancybox.  If None, use rc

          *shadow*: [ None | False | True ]
            If *True*, draw a shadow behind legend. If *None*, use rc settings.

          *ncol* : integer
            number of columns. default is 1

          *mode* : [ "expand" | None ]
            if mode is "expand", the legend will be horizontally expanded
            to fill the axes area (or *bbox_to_anchor*)

          *title* : string
            the legend title

        Padding and spacing between various elements use following keywords
        parameters. The dimensions of these values are given as a fraction
        of the fontsize. Values from rcParams will be used if None.

        ================   ==================================================================
        Keyword            Description
        ================   ==================================================================
        borderpad          the fractional whitespace inside the legend border
        labelspacing       the vertical space between the legend entries
        handlelength       the length of the legend handles
        handletextpad      the pad between the legend handle and text
        borderaxespad      the pad between the axes and legend border
        columnspacing      the spacing between columns
        ================   ==================================================================


        **Example:**

        .. plot:: mpl_examples/pylab_examples/figlegend_demo.py
        (RRRzR�(R thandlestlabelsR�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytlegend1sYcOs[ti||�}td|d|d|�}|j|�|j|�|jj|�|S(sT
        Call signature::

          figtext(x, y, s, fontdict=None, **kwargs)

        Add text to figure at location *x*, *y* (relative 0-1
        coords). See :func:`~matplotlib.pyplot.text` for the meaning
        of the other arguments.

        kwargs control the :class:`~matplotlib.text.Text` properties:

        %(Text)s
        R�R�R�(RR
RRQRxR�(R R�R�R4R�R�toverrideR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��s

cCs0||kr|j|�n|j|j�dS(N(t
set_figuret
set_transformRN(R R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyRQ�scKs�|j�}|dk	r�|jdt�}|jdd�}|rz|dk	rq|dkrqtdd|��nd}nt|�}t||�r�|Sn|jd|�S(s�
        Return the current axes, creating one if necessary

        The following kwargs are supported
        %(Axes)s
        R�R�s!polar=True, yet projection='%s'. s/Only one of these arguments should be supplied.ioN(RUR0R�RkR2RR�R�(R R�RpR�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytgca�s	cCs2|jj|�x|jD]}||�qW|S(s)Set the current axes to be a and return a(RUtbubbleR�(R R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR��scCs:x3t|j�D]"}|j�}|dk	r|SqWdS(sZ
        helper for :func:`~matplotlib.pyplot.gci`;
        do not use elsewhere.
        N(treversedRUt_gciR0(R RpR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR�s
cCs|jj|�dS(s9whenever the axes state change, func(self) will be calledN(R�R�(R R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytadd_axobserver�sc
Os�|jdtd�td}|rvt|d�rvd|dkrv|dkrv|dd|}|f|d}n|jdt�}|r
|jd	d
�|jdd
�g}x~|jD]H}|j}|j|j�|j	�f�|j
d
�|jd
�q�Wn(|jd	td�|jdtd
�|jj
||�|r�xKt|j|�D]4\}}	|jj
|	d�|jj|	d�qaWndS(s�

        call signature::

          savefig(fname, dpi=None, facecolor='w', edgecolor='w',
                  orientation='portrait', papertype=None, format=None,
                  transparent=False, bbox_inches=None, pad_inches=0.1):

        Save the current figure.

        The output formats available depend on the backend being used.

        Arguments:

          *fname*:
            A string containing a path to a filename, or a Python file-like object,
            or possibly some backend-dependent object such as
            :class:`~matplotlib.backends.backend_pdf.PdfPages`.

            If *format* is *None* and *fname* is a string, the output
            format is deduced from the extension of the filename. If
            the filename has no extension, the value of the rc parameter
            ``savefig.extension`` is used. If that value is 'auto',
            the backend determines the extension.

            If *fname* is not a string, remember to specify *format* to
            ensure that the correct backend is used.

        Keyword arguments:

          *dpi*: [ None | scalar > 0 ]
            The resolution in dots per inch.  If *None* it will default to
            the value ``savefig.dpi`` in the matplotlibrc file.

          *facecolor*, *edgecolor*:
            the colors of the figure rectangle

          *orientation*: [ 'landscape' | 'portrait' ]
            not supported on all backends; currently only on postscript output

          *papertype*:
            One of 'letter', 'legal', 'executive', 'ledger', 'a0' through
            'a10', 'b0' through 'b10'. Only supported for postscript
            output.

          *format*:
            One of the file extensions supported by the active
            backend.  Most backends support png, pdf, ps, eps and svg.

          *transparent*:
            If *True*, the axes patches will all be transparent; the
            figure patch will also be transparent unless facecolor
            and/or edgecolor are specified via kwargs.
            This is useful, for example, for displaying
            a plot on top of a colored background on a web page.  The
            transparency of these patches will be restored to their
            original values upon exit of this function.

          *bbox_inches*:
            Bbox in inches. Only the given portion of the figure is
            saved. If 'tight', try to figure out the tight bbox of
            the figure.

          *pad_inches*:
            Amount of padding around the figure when bbox_inches is
            'tight'.

          *bbox_extra_artists*:
            A list of extra artists that will be considered when the
            tight bbox is calculated.

        RJssavefig.dpissavefig.extensionit.tautoittransparentRCtnoneRDssavefig.facecolorssavefig.edgecolorN(t
setdefaultRR	R�RkRVROR�R�R�R�R�RStprint_figuretzip(
R R�R�t	extensiontfnameR	toriginal_axes_colorsRpROtcc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytsavefig�s.I
2	
cs�|dkr|j�}n|dkrBtj||�\}}n|jt�tj|||���fd�}|jjd|�|_	|j
�|�|j|��S(s�
        Create a colorbar for a ScalarMappable instance.

        Documentation for the pylab thin wrapper:
        %(colorbar_doc)s
        cs7�j|j���j|j���j|�dS(N(tset_cmaptget_cmapR�tget_climt
update_normal(tm(tcb(sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt
on_changedRstchangedN(R0Rtcbart	make_axesR�RtColorbartcallbacksSMtconnecttcbidtset_colorbarR�(R tmappabletcaxRptkwR((RsD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytcolorbarCs

cOs�|jj||�ddl}x�|jD]�}t||jj�s�|jdk	r�t|j|jj�r�|jj�|j	|jj
�q�|jdk	r�t|j|jj�r�|jj�|j	|jj
�q�q)|j�|j	|j
�q)WdS(s�
        fig.subplots_adjust(left=None, bottom=None, right=None, top=None,
            wspace=None, hspace=None)

        Update the :class:`SubplotParams` with *kwargs* (defaulting to rc where
        None) and update the subplot locations

        i����N(RTRtmatplotlib.axesRVR�Rt_sharexR0t
update_paramstset_positiontfigboxt_sharey(R R�R�t
matplotlibRp((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyRm]s	'
'

iiicCs7t|d|d|d|�}|d|d|d|�S(s�
        call signature::

          ginput(self, n=1, timeout=30, show_clicks=True,
                 mouse_add=1, mouse_pop=3, mouse_stop=2)

        Blocking call to interact with the figure.

        This will wait for *n* clicks from the user and return a list of the
        coordinates of each click.

        If *timeout* is zero or negative, does not timeout.

        If *n* is zero or negative, accumulate clicks until a middle click
        (or potentially both mouse buttons at once) terminates the input.

        Right clicking cancels last input.

        The buttons used for the various actions (adding points, removing
        points, terminating the inputs) can be overriden via the
        arguments *mouse_add*, *mouse_pop* and *mouse_stop*, that give
        the associated mouse button: 1 for left, 2 for middle, 3 for
        right.

        The keyboard can also be used to select points in case your mouse
        does not have one or more of the buttons.  The delete and backspace
        keys act like right clicking (i.e., remove last point), the enter key
        terminates input and any other key (not already used by the window
        manager) selects a point.
        t	mouse_addt	mouse_popt
mouse_stoptnttimeouttshow_clicks(R(R R0R1R2R-R.R/tblocking_mouse_input((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytginputus
 	i����cCst|�}|d|�S(sd
        call signature::

          waitforbuttonpress(self, timeout=-1)

        Blocking call to interact with the figure.

        This will return True is a key was pressed, False if a mouse
        button was pressed and None if *timeout* was reached without
        either being pressed.

        If *timeout* is negative, does not timeout.
        R1(R(R R1tblocking_input((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pytwaitforbuttonpress�scCs�g}x6|jD]+}|j�r|j|j|��qqWtjg|D]*}|jdksp|jdkrL|^qL�}t|t	�j
d|j��}|S(s�
        Return a (tight) bounding box of the figure in inches.

        It only accounts axes title, axis labels, and axis
        ticklabels. Needs improvement.
        ig�?(RVR�R�t
get_tightbboxRtunionRARBRRR]RJ(R R�tbbRpR�t_bboxRL((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR7�s@N(;R7R8R9R>R0RR'R[R_tpropertyRJRsR|RR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�Rtdedent_interpdR�R�RkRWR\RR�R�RiR�R�RQRR�RRRR%RmR4R6R7(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyR:zs�	9		$				$	B	#															FC	N			^					f	&c	Cs�t|d�}tjd	�}tjd
�}|rY|jd \}}t|�|}nt|�}tdd}tj|||f�}|td||�:}|td||�:}tj|||�}|S(s;
    Create a figure with specified aspect ratio.  If *arg* is a number,
    use that aspect ratio.  If *arg* is an array, figaspect will
    determine the width and height for a figure that would fit array
    preserving aspect ratio.  The figure width, height in inches are
    returned.  Be sure to create an axes with equal with and height,
    eg

    Example usage::

      # make a figure twice as tall as it is wide
      w, h = figaspect(2.)
      fig = Figure(figsize=(w,h))
      ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
      ax.imshow(A, **kwargs)


      # make a figure with the proper aspect for an array
      A = rand(5,3)
      w, h = figaspect(A)
      fig = Figure(figsize=(w,h))
      ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
      ax.imshow(A, **kwargs)

    Thanks to Fernando Perez for this function
    tshapeg@g@g0@isfigure.figsizeig�?(g@g@(g0@g0@(	RdRbtarrayR=tfloatRtmintmaxtclip(	targtisarraytfigsize_mintfigsize_maxtnrtnct	arr_ratiot
fig_heighttnewsize((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt	figaspect�s(4R9tnumpyRbtartistRRRVRRRRFRRRRR	R�R%RtimageR
R,RRwRR�R
RR�Rt
transformsRRRRtprojectionsRRRtmatplotlib.blocking_inputRRtmatplotlib.cbookRtoperatorRtinterpdRRR:RLtkwdoc(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/figure.pyt<module>
s6("R����O	>