KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/matplotlib/backend_bases.pyo
�
r`]c@ s�dZddlmZmZddlZddlZddlZddlZddlZ	ddl
jZddlj
Z
ddljZddljZddlmZddlmZddlmZddlmZmZmZddlZddljZddljZddlm Z ydd	l!m"Z"e#Z$Wne%k
rMe&Z$nXiZ'd
�Z(de)fd��YZ*d
fd��YZ+dfd��YZ,de)fd��YZ-dfd��YZ.de.fd��YZ/de.fd��YZ0de.fd��YZ1de.fd��YZ2de.fd��YZ3de3fd ��YZ4d!e.fd"��YZ5d#e3fd$��YZ6d%e)fd&��YZ7e8d'�Z9d(e:fd)��YZ;d*fd+��YZ<d,fd-��YZ=e=�Z>d.e)fd/��YZ?dS(0s�
Abstract base classes define the primitives that renderers and
graphics contexts must implement to serve as a matplotlib backend

:class:`RendererBase`
    An abstract base class to handle drawing/rendering operations.

:class:`FigureCanvasBase`
    The abstraction layer that separates the
    :class:`matplotlib.figure.Figure` from the backend specific
    details like a user interface drawing area

:class:`GraphicsContextBase`
    An abstract base class that provides color, line styles, etc...

:class:`Event`
    The base class for all of the matplotlib event
    handling.  Derived classes suh as :class:`KeyEvent` and
    :class:`MouseEvent` store the meta data like keys and buttons
    pressed, x and y locations in pixel and
    :class:`~matplotlib.axes.Axes` coordinates.

:class:`ShowBase`
    The base class for the Show class of each interactive backend;
    the 'show' callable is then set to Show.__call__, inherited from
    ShowBase.

i����(tdivisiontprint_functionN(trcParams(tis_interactive(tGcf(tBboxtTransformedBboxtAffine2D(tPath(tImagecC s|t|<dS(N(t
_backend_d(tformatt
backend_class((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytregister_backend:stShowBasecB s#eZdZdd�Zd�ZRS(su
    Simple base class to generate a show() callable in backends.

    Subclass must override mainloop() method.
    cC s�tj�}|sdSx|D]}|j�qW|dk	rX|rQ|j�dSdSnddlm}y|jj}Wntk
r�t	}nX|r�dSt
�s�|j�ndS(sB
        Show all figures.  If *block* is not None, then
        it is a boolean that overrides all other factors
        determining whether show blocks by calling mainloop().
        The other factors are:
        it does not block if run inside "ipython --pylab";
        it does not block in interactive mode.
        Ni����(tpyplot(Rtget_all_fig_managerstshowtNonetmainloopt
matplotlibRt	_needmaintAttributeErrortFalseR(tselftblocktmanagerstmanagerRt
ipython_pylab((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt__call__Ds&	



	cC sdS(N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRnsN(t__name__t
__module__t__doc__RRR(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR>s*tRendererBasecB s+eZdZd�Zd d�Zd�Zd d�Zd d�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zdd�Zed�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"RS(!s�An abstract base class to handle drawing/rendering operations.

    The following methods *must* be implemented in the backend:

    * :meth:`draw_path`
    * :meth:`draw_image`
    * :meth:`draw_text`
    * :meth:`get_text_width_height_descent`

    The following methods *should* be implemented in the backend for
    optimization reasons:

    * :meth:`draw_markers`
    * :meth:`draw_path_collection`
    * :meth:`draw_quad_mesh`
    cC sd|_tj�|_dS(N(Rt_texmanagerttextpatht
TextToPatht
_text2path(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt__init__�s	cC sdS(s�
        Open a grouping element with label *s*. If *gid* is given, use
        *gid* as the id of the group. Is only currently used by
        :mod:`~matplotlib.backends.backend_svg`.
        N((Rtstgid((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
open_group�scC sdS(s�
        Close a grouping element with label *s*
        Is only currently used by :mod:`~matplotlib.backends.backend_svg`
        N((RR'((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytclose_group�scC s
t�dS(sk
        Draws a :class:`~matplotlib.path.Path` instance using the
        given affine transform.
        N(tNotImplementedError(Rtgctpatht	transformtrgbFace((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	draw_path�scC suxn|j|dt�D]W\}}t|�r|d\}	}
|j|||tj�j|	|
�|�qqWdS(s�
        Draws a marker at each of the vertices in path.  This includes
        all vertices, including control points on curves.  To avoid
        that behavior, those vertices should be removed before calling
        this function.

        *gc*
            the :class:`GraphicsContextBase` instance

        *marker_trans*
            is an affine transform applied to the marker.

        *trans*
             is an affine transform applied to the path.

        This provides a fallback implementation of draw_markers that
        makes multiple calls to :meth:`draw_path`.  Some backends may
        want to override this method in order to draw the marker only
        once and reuse it multiple times.
        tsimplifyi����N(t
iter_segmentsRtlenR0t
transformsRt	translate(RR,tmarker_pathtmarker_transR-ttransR/tverticestcodestxty((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_markers�s"cC s�g}x6|j|||�D]\}}|j||f�qWx�|j|||||||||	|
|||
�
D]X\}}}}}|\}}tj|j��j||�}|j||||�qsWdS(s�
        Draws a collection of paths selecting drawing properties from
        the lists *facecolors*, *edgecolors*, *linewidths*,
        *linestyles* and *antialiaseds*. *offsets* is a list of
        offsets to apply to each of the paths.  The offsets in
        *offsets* are first transformed by *offsetTrans* before being
        applied.  *offset_position* may be either "screen" or "data"
        depending on the space that the offsets are in.

        This provides a fallback implementation of
        :meth:`draw_path_collection` that makes multiple calls to
        :meth:`draw_path`.  Some backends may want to override this in
        order to render each set of path data only once, and then
        reference that path multiple times with the different offsets,
        colors, styles etc.  The generator methods
        :meth:`_iter_collection_raw_paths` and
        :meth:`_iter_collection` are provided to help with (and
        standardize) the implementation across backends.  It is highly
        recommended to use those generators, so that changes to the
        behavior of :meth:`draw_path_collection` can be made globally.
        N(t_iter_collection_raw_pathstappendt_iter_collectionR4Rt
get_matrixR5R0(RR,tmaster_transformtpathstall_transformstoffsetstoffsetTranst
facecolorst
edgecolorst
linewidthst
linestylestantialiasedsturlstoffset_positiontpath_idsR-R.txotyotpath_idtgc0R/((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_path_collection�s		"!cC s�ddlm}|j|||�}|
dkr:|}
ntj|j�gtj�}
|j|||g||||
|
g|	gdgd�
S(s�
        This provides a fallback implementation of
        :meth:`draw_quad_mesh` that generates paths and then calls
        :meth:`draw_path_collection`.
        i����(tQuadMeshtscreenN(	tmatplotlib.collectionsRTtconvert_mesh_to_pathsRtnptarrayt
get_linewidthtfloat_RS(RR,RBt	meshWidtht
meshHeighttcoordinatesRERFRGtantialiasedRHRTRCRI((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_quad_mesh�s		cC s
t�dS(s
        Draw a Gouraud-shaded triangle.

        *points* is a 3x2 array of (x, y) points for the triangle.

        *colors* is a 3x4 array of RGBA colors for each point of the
        triangle.

        *transform* is an affine transform to apply to the points.
        N(R+(RR,tpointstcolorsR.((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_gouraud_triangle�scC sF|j�}x3t||�D]"\}}|j||||�qWdS(s
        Draws a series of Gouraud triangles.

        *points* is a Nx3x2 array of (x, y) points for the trianglex.

        *colors* is a Nx3x4 array of RGBA colors for each point of the
        triangles.

        *transform* is an affine transform to apply to the points.
        N(tfrozentzipRc(RR,ttriangles_arraytcolors_arrayR.ttritcol((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_gouraud_trianglessc
c s�t|�}t|�}t||�}|dkr7dStj�}xHt|�D]:}|||}	|r{|||}n|	||fVqPWdS(sI
        This is a helper method (along with :meth:`_iter_collection`) to make
        it easier to write a space-efficent :meth:`draw_path_collection`
        implementation in a backend.

        This method yields all of the base path/transform
        combinations, given a master transform, a list of paths and
        list of transforms.

        The arguments should be exactly what is passed in to
        :meth:`draw_path_collection`.

        The backend should take each yielded path and transform and
        create an object that can be referenced (reused) later.
        iN(R3tmaxR4tIdentityTransformtxrange(
RRBRCRDtNpathstNtransformstNR.tiR-((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR>sc#
c st|�}t|�}t|�}t||�}t|�}t|�}t|	�}t|
�}t|�}t|�}|dkr�|dks�|dkr�dS|r�|j|�}n|j�}|j|�|dkr�d}n|dkr|jd�nd\}}x�t|�D]�}|||}|r�|||\}}|
dkr�|rs||||}n|}|j||f�\}}|jd�\} }!| |}|!|}q�n|r�|||}n|rn|||}"|dkr"t|"�dkr"|j	|"d�n|j
|"�|rM|j|	||�n|rn|j|
||�qnn|dk	r�t|�dkr�|ddkr�d}q�|j	|d�|d }n|j|||�|r�|j
|||�n|||||fVqW|j�dS(	s
        This is a helper method (along with
        :meth:`_iter_collection_raw_paths`) to make it easier to write
        a space-efficent :meth:`draw_path_collection` implementation in a
        backend.

        This method yields all of the path, offset and graphics
        context combinations to draw the path collection.  The caller
        should already have looped over the results of
        :meth:`_iter_collection_raw_paths` to draw this collection.

        The arguments should be the same as that passed into
        :meth:`draw_path_collection`, with the exception of
        *path_ids*, which is a list of arbitrary objects that the
        backend will use to reference one of the paths created in the
        :meth:`_iter_collection_raw_paths` stage.

        Each yielded result is of the form::

           xo, yo, path_id, gc, rgbFace

        where *xo*, *yo* is an offset; *path_id* is one of the elements of
        *path_ids*; *gc* is a graphics context and *rgbFace* is a color to
        use for filling the path.
        iNgtdataii(ii(ii(R3RkR.tnew_gctcopy_propertiesRt
set_linewidthRmttransform_pointt	set_alphatset_foregroundt
set_dashestset_antialiasedtset_urltrestore(#RR,RBRDRNRERFRGRHRIRJRKRLRMRoRntNoffsetsRptNfacecolorstNedgecolorstNlinewidthstNlinestylestNaatNurlsttoffsetsRRR/RORPRqRQR.txptyptfg((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR@2sl$
	
	
cC sdS(s�
        Get the factor by which to magnify images passed to :meth:`draw_image`.
        Allows a backend to have images at a different resolution to other
        artists.
        g�?((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_image_magnification�scC s
t�dS(s�
        Draw the image instance into the current axes;

        *gc*
            a GraphicsContext containing clipping information

        *x*
            is the distance in pixels from the left hand side of the canvas.

        *y*
            the distance from the origin.  That is, if origin is
            upper, y is the distance from top.  If origin is lower, y
            is the distance from bottom

        *im*
            the :class:`matplotlib._image.Image` instance
        N(R+(RR,R;R<tim((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
draw_image�scC stS(s�
        override this method for renderers that do not necessarily
        want to rescale and composite raster images. (like SVG)
        (R(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytoption_image_nocomposite�scC stS(s�
        override this method for renderers that support arbitrary
        scaling of image (most of the vector backend).
        (R(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytoption_scale_image�ssTeX!c	C s&|j||||||dd�dS(s	
        tismathtTeXN(t_draw_text_as_path(RR,R;R<R'tproptangleR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_tex�scC s#|j|||||||�dS(sT
        Draw the text instance

        *gc*
            the :class:`GraphicsContextBase` instance

        *x*
            the x location of the text in display coords

        *y*
            the y location of the text in display coords

        *s*
             a :class:`matplotlib.text.Text` instance

        *prop*
          a :class:`matplotlib.font_manager.FontProperties` instance

        *angle*
            the rotation angle in degrees

        **backend implementers note**

        When you are trying to determine if you have gotten your bounding box
        right (which is what enables the text layout/alignment to work
        properly), it helps to change the line in text.py::

            if 0: bbox_artist(self, renderer)

        to if 1, and then the actual bounding box will be blotted along with
        your text.
        N(R�(RR,R;R<R'R�R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	draw_text�s"c
C s"|j}|j|j��}|dkrQ|j||dtdt�\}	}
n$|j||d|dt�\}	}
t|	|
�}|dd}|j�r�t�j	||j
||j
�j|�j||j
|�}n8t�j	||j
||j
�j|�j||�}||fS(s 
        return the text path and transform

        *prop*
          font property

        *s*
          text to be converted

        *usetex*
          If True, use matplotlib usetex mode.

        *ismath*
          If True, use mathtext parser. If "TeX", use *usetex* mode.
        R�R�tusetexg�f@gz���!	@(R%tpoints_to_pixelstget_size_in_pointst
get_text_pathRtTrueRtflipyRtscalet
FONT_SCALEtrotateR5theight(
RR;R<R'R�R�R�t	text2pathtfontsizetvertsR:R-R.((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_get_text_path_transform�s	'$cC s^|j||||||�\}}	|j�d }
|jd�|j|||	d|
�dS(s>
        draw the text by converting them to paths using textpath module.

        *prop*
          font property

        *s*
          text to be converted

        *usetex*
          If True, use matplotlib usetex mode.

        *ismath*
          If True, use mathtext parser. If "TeX", use *usetex* mode.
        igR/N(R�tget_rgbRuR0(RR,R;R<R'R�R�R�R-R.tcolor((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�s$
cC sU|dkra|j�}|jj�}|j�}|j||d|�\}}}	|||	fS|jd�}
|jj}|r�|jjj||
|�\}}
}}}||
|fS|jj�}|jj	|�}|j�}|j
||
�|j|dd|�|j�\}}|j
�}	|d}|d}|	d}	|||	fS(s�
        get the width and height, and the offset from the bottom to the
        baseline (descent), in display coords of the string s with
        :class:`~matplotlib.font_manager.FontProperties` prop
        R�trendereriHgtflagsgP@(R�R%tget_texmanagertget_text_width_height_descentR�R�tmathtext_parsertparset_get_hinting_flagt	_get_fonttset_sizetset_texttget_width_heighttget_descent(RR'R�R�tsizet
texmanagerR�twthtdtdpit	fontscaletwidthR�tdescenttglyphstrectsR�tfont((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR� s.
*



cC stS(s�
        Return true if y small numbers are top for renderer Is used
        for drawing text (:mod:`matplotlib.text`) and images
        (:mod:`matplotlib.image`) only
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�CscC sdS(s4return the canvas width and height in display coordsi(ii((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_canvas_width_heightKscC s5|jdkr.ddlm}|�|_n|jS(sO
        return the :class:`matplotlib.texmanager.TexManager` instance
        i����(t
TexManagerN(R"Rtmatplotlib.texmanagerR�(RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�OscC st�S(sF
        Return an instance of a :class:`GraphicsContextBase`
        (tGraphicsContextBase(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRsYscC s|S(s�
        Convert points to display units

        *points*
            a float or a numpy array of float

        return points converted to pixels

        You need to override this function (unless your backend
        doesn't have a dpi, eg, postscript or svg).  Some imaging
        systems assume some value for pixels per inch::

            points to pixels = points * pixels_per_inch/72.0 * dpi/72.0
        ((RRa((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�_scC s
tj|�S(N(tcbookt
strip_math(RR'((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�pscC sdS(sK
        Used in MixedModeRenderer. Switch to the raster renderer.
        N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart_rasterizingsscC sdS(s�
        Used in MixedModeRenderer. Switch back to the vector renderer
        and draw the contents of the raster renderer as an image on
        the vector renderer.
        N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_rasterizingyscC sdS(sj
        Used in AggRenderer. Switch to a temporary renderer for image
        filtering effects.
        N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart_filter�scC sdS(s�
        Used in AggRenderer. Switch back to the original renderer.
        The contents of the temporary renderer is processed with the
        *filter_func* and is drawn on the original renderer as an
        image.
        N((Rtfilter_func((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_filter�sN(#RRR R&RR)R*R0R=RSR`RcRjR>R@R�R�R�R�R�RR�R�R�R�R�R�R�RsR�R�R�R�R�R�(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR!ss>			&		
			\				$	'		#			
						R�cB sqeZdZid,d6dd-fd6dd.fd6dd/fd	6Zd
�Zd�Zd�Zd
�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed �Zd!�Zd"�Zd#�Zd$�Z d%�Z!d&�Z"d'�Z#d(�Z$d)�Z%dd*�Z&RS(0sI
    An abstract base class that provides color, line styles, etc...
    tsolidig@tdashedg@g@g�?tdashdottdottedcC s�d|_t|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_dS(	Ng�?itbutttroundR�g(NN(ggg(t_alphaRt
_forced_alphat_antialiasedt	_capstyleRt	_cliprectt	_clippatht_dashest
_joinstylet
_linestylet
_linewidtht_rgbt_hatcht_urlt_gidt_snap(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�s														cC s�|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j	|_	|j
|_
|j|_|j|_|j
|_
dS(sCopy properties from gc to selfN(R�R�R�R�R�R�R�R�R�R�R�R�R�R�(RR,((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRt�scC sdS(s�
        Restore the graphics context from the stack - needed only
        for backends that save graphics contexts on a stack
        N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR|�scC s|jS(sb
        Return the alpha value used for blending - not supported on
        all backends
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	get_alpha�scC s|jS(s@Return true if the object should try to do antialiased rendering(R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_antialiased�scC s|jS(sT
        Return the capstyle as a string in ('butt', 'round', 'projecting')
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_capstyle�scC s|jS(s^
        Return the clip rectangle as a :class:`~matplotlib.transforms.Bbox` instance
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_clip_rectangle�scC s |jdk	r|jj�SdS(s�
        Return the clip path in the form (path, transform), where path
        is a :class:`~matplotlib.path.Path` instance, and transform is
        an affine transform to apply to the path before clipping.
        N(NN(R�Rtget_transformed_path_and_affine(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
get_clip_path�s
cC s|jS(sN
        Return the dash information as an offset dashlist tuple.

        The dash list is a even size list that gives the ink on, ink
        off in pixels.

        See p107 of to PostScript `BLUEBOOK
        <http://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF>`_
        for more info.

        Default value is None
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
get_dashes�s
cC s|jS(sR
        Return the line join style as one of ('miter', 'round', 'bevel')
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
get_joinstyle�scC s|jS(s`
        Return the linestyle: one of ('solid', 'dashed', 'dashdot',
        'dotted').
        (R�(Rtstyle((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
get_linestyle�scC s|jS(s=
        Return the line width in points as a scalar
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRZscC s|jS(sC
        returns a tuple of three or four floats from 0-1.
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�scC s|jS(s=
        returns a url if one is set, None otherwise
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_urlscC s|jS(sM
        Return the object identifier if one is set, None otherwise.
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_gidscC s|jS(s
        returns the snap setting which may be:

          * True: snap vertices to the nearest pixel center

          * False: leave vertices as-is

          * None: (auto) If the path contains only rectilinear line
            segments, round to the nearest pixel center
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_snapscC s.|dk	r!||_t|_n	t|_dS(s_
        Set the alpha value used for blending - not supported on
        all backends
        N(RR�R�R�R(Rtalpha((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRw*s	cC s|rd|_n	d|_dS(sK
        True if object should be drawn with antialiased rendering
        iiN(R�(Rtb((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRz5scC s,|dkr||_ntd|��dS(sQ
        Set the capstyle as a string in ('butt', 'round', 'projecting')
        R�R�t
projectings!Unrecognized cap style.  Found %sN(sbuttsroundR�(R�t
ValueError(Rtcs((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_capstyle>scC s
||_dS(sT
        Set the clip rectangle with sequence (left, bottom, width, height)
        N(R�(Rt	rectangle((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_clip_rectangleGscC s
||_dS(s�
        Set the clip path and transformation.  Path should be a
        :class:`~matplotlib.transforms.TransformedPath` instance.
        N(R�(RR-((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_clip_pathMscC s||f|_dS(s�
        Set the dash style for the gc.

        *dash_offset*
            is the offset (usually 0).

        *dash_list*
            specifies the on-off sequence as points.  ``(None, None)`` specifies a solid line

        N(R�(Rtdash_offsett	dash_list((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRyUscC sa|r||_ntjj|�|_t|j�dkr]|jr]|j|jd�ndS(s)
        Set the foreground color.  fg can be a MATLAB format string, a
        html hex color string, an rgb or rgba unit tuple, or a float between 0
        and 1.  In the latter case, grayscale is used.

        If you know fg is rgb or rgba, set ``isRGB=True`` for
        efficiency.
        iiN(R�RbtcolorConvertertto_rgbaR3R�Rw(RR�tisRGB((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRxbs
	cC s|||f|_dS(sI
        Set the foreground color to be a gray level with *frac*
        N(R�(Rtfrac((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_grayleveluscC s,|dkr||_ntd|��dS(sM
        Set the join style to be one of ('miter', 'round', 'bevel')
        tmiterR�tbevels"Unrecognized join style.  Found %sN(R�sroundR�(R�R�(Rtjs((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_joinstyle{scC s
||_dS(s-
        Set the linewidth in points
        N(R�(RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRu�scC s|||jj�kr+|j|\}}n4t|t�rI|\}}ntdt|���||_|j||�dS(s�
        Set the linestyle to be one of ('solid', 'dashed', 'dashdot',
        'dotted'). One may specify customized dash styles by providing
        a tuple of (offset, dash pairs). For example, the predefiend
        linestyles have following values.:

         'dashed'  : (0, (6.0, 6.0)),
         'dashdot' : (0, (3.0, 5.0, 1.0, 5.0)),
         'dotted'  : (0, (1.0, 3.0)),
        sUnrecognized linestyle: %sN(tdashdtkeyst
isinstancettupleR�tstrR�Ry(RR�toffsettdashes((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_linestyle�s	cC s
||_dS(s?
        Sets the url for links in compatible backends
        N(R�(Rturl((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR{�scC s
||_dS(s
        Sets the id.
        N(R�(Rtid((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_gid�scC s
||_dS(s
        Sets the snap setting which may be:

          * True: snap vertices to the nearest pixel center

          * False: leave vertices as-is

          * None: (auto) If the path contains only rectilinear line
            segments, round to the nearest pixel center
        N(R�(Rtsnap((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_snap�scC s
||_dS(s2
        Sets the hatch style for filling
        N(R�(Rthatch((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	set_hatch�scC s|jS(s.
        Gets the current hatch style
        (R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	get_hatch�scC s&|jdkrdStj|j|�S(s7
        Returns a Path for the current hatch.
        N(R�RRR
(Rtdensity((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_hatch_path�sN(NN(g@g@(g@g@g�?g@(g�?g@('RRR RR�R&RtR|R�R�R�R�R�R�R�R�RZR�R�R�R�RwRzR�R�R�RyRRxR�R�RuRR{RR	RRR(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��sN

								
								
								
								
		t	TimerBasecB s�eZdZddd�Zd�Zdd�Zd�Zd�Zd�Z	d�Z
d�Zee
e�Z
d	�Zed
�Zeee�Zd�Zd�Zd
�Zd�Zd�ZRS(sv
    A base class for providing timer events, useful for things animations.
    Backends need to implement a few specific methods in order to use their
    own timing mechanisms so that the timer events are integrated into their
    event loops.

    Mandatory functions that must be implemented:

        * `_timer_start`: Contains backend-specific code for starting
          the timer

        * `_timer_stop`: Contains backend-specific code for stopping
          the timer

    Optional overrides:

        * `_timer_set_single_shot`: Code for setting the timer to
          single shot operating mode, if supported by the timer
          object. If not, the `Timer` class itself will store the flag
          and the `_on_timer` method should be overridden to support
          such behavior.

        * `_timer_set_interval`: Code for setting the interval on the
          timer, if there is a method for doing so on the timer
          object.

        * `_on_timer`: This is the internal function that any timer
          object should call, which will handle the task of running
          all callbacks that have been set.

    Attributes:

        * `interval`: The time between timer events in
          milliseconds. Default is 1000 ms.

        * `single_shot`: Boolean flag indicating whether this timer
          should operate as single shot (run once and then
          stop). Defaults to `False`.

        * `callbacks`: Stores list of (func, args) tuples that will be
          called upon timer events. This list can be manipulated
          directly, or the functions `add_callback` and
          `remove_callback` can be used.
    cC sY|dkrg|_n
||_|dkr:d|_n	||_t|_d|_dS(Ni�(Rt	callbackst	_intervalRt_singlet_timer(RtintervalR((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�s
		cC s|j�dS(s1Need to stop timer and possibly disconnect timer.N(t_timer_stop(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt__del__scC s*|dk	r|j|�n|j�dS(s�
        Start the timer object. `interval` is optional and will be used
        to reset the timer interval first if provided.
        N(Rt
_set_intervalt_timer_start(RR((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstartscC s|j�dS(s!
        Stop the timer.
        N(R(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstopscC sdS(N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRscC sdS(N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR"scC s|jS(N(R(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
_get_interval%scC s#t|�}||_|j�dS(N(tintRt_timer_set_interval(RR((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR(s	cC s|jS(N(R(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_get_single_shot1scC s||_|j�dS(N(Rt_timer_set_single_shot(Rtss((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_set_single_shot4s	cO s|jj|||f�dS(s�
        Register `func` to be called by timer when the event fires. Any
        additional arguments provided will be passed to `func`.
        N(RR?(Rtfunctargstkwargs((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytadd_callback:scO st|s|r(|jj|||f�nHg|jD]}|d^q2}||krp|jj|j|��ndS(s�
        Remove `func` from list of callbacks. `args` and `kwargs` are optional
        and used to distinguish between copies of the same function registered
        to be called with different arguments.
        iN(Rtremovetpoptindex(RR"R#R$tctfuncs((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytremove_callbackAs
 cC sdS(s0Used to set interval on underlying timer object.N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRNscC sdS(s3Used to set single shot on underlying timer object.N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRRscC szxQ|jD]F\}}}|||�}|tkr
|jj|||f�q
q
Wt|j�dkrv|j�ndS(s�
        Runs all function that have been registered as callbacks. Functions
        can return False if they should not be called any more. If there
        are no callbacks, the timer is automatically stopped.
        iN(RRR&R3R(RR"R#R$tret((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	_on_timerVs N(RRR RR&RRRRRRRtpropertyRRR�R!tsingle_shotR%R+RRR-(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�s$,										
		tEventcB seZdZdd�ZRS(su
    A matplotlib event.  Attach additional attributes as defined in
    :meth:`FigureCanvasBase.mpl_connect`.  The following attributes
    are defined and shown with their default values

    *name*
        the event name

    *canvas*
        the FigureCanvas instance generating the event

    *guiEvent*
        the GUI event that triggered the matplotlib event


    cC s||_||_||_dS(N(tnametcanvastguiEvent(RR1R2R3((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&vs		N(RRR RR&(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR0est	IdleEventcB seZdZRS(sc
    An event triggered by the GUI backend when it is idle -- useful
    for passive animation
    (RRR (((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR4{st	DrawEventcB seZdZd�ZRS(s�
    An event triggered by a draw operation on the canvas

    In addition to the :class:`Event` attributes, the following event attributes are defined:

    *renderer*
        the :class:`RendererBase` instance for the draw event

    cC s tj|||�||_dS(N(R0R&R�(RR1R2R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�s(RRR R&(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR5�s	tResizeEventcB seZdZd�ZRS(s�
    An event triggered by a canvas resize

    In addition to the :class:`Event` attributes, the following event attributes are defined:

    *width*
        width of the canvas in pixels

    *height*
        height of the canvas in pixels

    cC s/tj|||�|j�\|_|_dS(N(R0R&R�R�R�(RR1R2((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�s(RRR R&(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR6�st
CloseEventcB seZdZdd�ZRS(s�
    An event triggered by a figure being closed

    In addition to the :class:`Event` attributes, the following event attributes are defined:
    cC stj||||�dS(N(R0R&(RR1R2R3((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�sN(RRR RR&(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR7�st
LocationEventcB sGeZdZdZdZdZdZdZdZ	dd�Z
d�ZRS(s%
    An event that has a screen location

    The following additional attributes are defined and shown with
    their default values.

    In addition to the :class:`Event` attributes, the following
    event attributes are defined:

    *x*
        x position - pixels from left of canvas

    *y*
        y position - pixels from bottom of canvas

    *inaxes*
        the :class:`~matplotlib.axes.Axes` instance if mouse is over axes

    *xdata*
        x coord of mouse in data coords

    *ydata*
        y coord of mouse in data coords

    c
C s�tj|||d|�||_||_|dksC|dkrZd|_|j�dS|jjdkr�g|jj	j
�D]}|j|�r|^q}n|jjg}t|�dkr�d|_|j�dSt|�dkr|j
dd��|d|_n
|d|_y+|jjj�j||f�\}}	Wn#tk
rmd|_d|_nX||_|	|_|j�dS(s?
        *x*, *y* in figure coords, 0,0 = bottom, left
        R3NiitkeycS s|jS(N(tzorder(R;((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt<lambda>�si����(R0R&R;R<Rtinaxest_update_enter_leaveR2t
mouse_grabbertfiguretget_axestin_axesR3tsortt	transDatatinvertedRvR�txdatatydata(
RR1R2R;R<R3tat	axes_listRERF((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�s4			
7	

+
	
		cC s�tjdk	r�tj}|j|jkr�y,|jdk	rU|jjjd|�nWnnX|jdk	r�|jjjd|�q�q�n(|jdk	r�|jjjd|�n|t_dS(s*process the figure/axes enter leave eventstaxes_leave_eventtaxes_enter_eventN(R8t	lasteventRR<R2Rtprocess(Rtlast((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR=�s	N(RRR RR;R<R<RERFRKR&R=(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR8�s+t
MouseEventcB s_eZdZdZdZdZdZdZdZ	dZ
dZdddedd�Z
d�ZRS(s�
    A mouse event ('button_press_event', 'button_release_event', 'scroll_event',
    'motion_notify_event').

    In addition to the :class:`Event` and :class:`LocationEvent`
    attributes, the following attributes are defined:

    *button*
        button pressed None, 1, 2, 3, 'up', 'down' (up and down are used
        for scroll events)

    *key*
        the key depressed when the mouse event triggered (see
        :class:`KeyEvent`)

    *step*
        number of scroll steps (positive for 'up', negative for 'down')


    Example usage::

        def on_press(event):
            print('you pressed', event.button, event.xdata, event.ydata)

        cid = fig.canvas.mpl_connect('button_press_event', on_press)

    ic

C sGtj|||||d|	�||_||_||_||_dS(sn
        x, y in figure coords, 0,0 = bottom, left
        button pressed None, 1, 2, 3, 'up', 'down'
        R3N(R8R&tbuttonR9tsteptdblclick(
RR1R2R;R<ROR9RPRQR3((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&9s
			cC s6dd|j|j|j|j|j|j|jfS(Ns4MPL MouseEvent: xy=(%d,%d) xydata=(%s,%s) button=%d sdblclick=%s inaxes=%s(R;R<RERFRORQR<(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt__str__EsN(RRR RR;R<RORQR<RERFRPRR&RR(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRNst	PickEventcB seZdZdd�ZRS(sx
    a pick event, fired when the user picks a location on the canvas
    sufficiently close to an artist.

    Attrs: all the :class:`Event` attributes plus

    *mouseevent*
        the :class:`MouseEvent` that generated the pick

    *artist*
        the :class:`~matplotlib.artist.Artist` picked

    other
        extra class dependent attrs -- eg a
        :class:`~matplotlib.lines.Line2D` pick may define different
        extra attributes than a
        :class:`~matplotlib.collections.PatchCollection` pick event


    Example usage::

        line, = ax.plot(rand(100), 'o', picker=5)  # 5 points tolerance

        def on_pick(event):
            thisline = event.artist
            xdata, ydata = thisline.get_data()
            ind = event.ind
            print('on pick line:', zip(xdata[ind], ydata[ind]))

        cid = fig.canvas.mpl_connect('pick_event', on_pick)

    cK s<tj||||�||_||_|jj|�dS(N(R0R&t
mouseeventtartistt__dict__tupdate(RR1R2RTRUR3R$((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&ls		N(RRR RR&(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRSKs tKeyEventcB s eZdZdddd�ZRS(s�
    A key event (key press, key release).

    Attach additional attributes as defined in
    :meth:`FigureCanvasBase.mpl_connect`.

    In addition to the :class:`Event` and :class:`LocationEvent`
    attributes, the following attributes are defined:

    *key*
        the key(s) pressed. Could be **None**, a single case sensitive ascii
        character ("g", "G", "#", etc.), a special key
        ("control", "shift", "f1", "up", etc.) or a
        combination of the above (e.g. "ctrl+alt+g", "ctrl+alt+G").

    .. note::

        Modifier keys will be prefixed to the pressed key and will be in the
        order "ctrl", "alt", "super". The exception to this rule is when the
        pressed key is itself a modifier key, therefore "ctrl+alt" and
        "alt+control" can both be valid key values.


    Example usage::

        def on_key(event):
            print('you pressed', event.key, event.xdata, event.ydata)

        cid = fig.canvas.mpl_connect('key_press_event', on_key)

    icC s,tj|||||d|�||_dS(NR3(R8R&R9(RR1R2R9R;R<R3((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�sN(RRR RR&(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRXsstFigureCanvasBasecB s�eZdZddddddddd	d
ddd
ddgZd�Zd�Zd�Zd�Zd`d�Z	d�Z
d�Zd�Zd`d�Z
d`d�Zd`d�Zd�Zd`d�Zed`d�Zd`d�Zd`d�Zd`d �Zd`d`d!�Zd`d"�Zd#�Zd$�Zd%�Zd&�Zd'�Zd(�Zi
d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d5d76d8d96d8d:6Zd;�Z d<�Z!d=�Z"d>�Z#d?�Z$d@�Z%dA�Z&e&Z'Z(dB�Z)dC�Z*e+r9dDedE<edF<dG�Z,e,Z-dHedI<edJ<dK�Z.e.Z/ndL�Z0dM�Z1dN�Z2d`dOdOdPd`dQ�Z3dR�Z4dS�Z5dT�Z6dU�Z7dV�Z8dW�Z9dX�Z:dY�Z;dZ�Z<d[�Z=d\�Z>d]d^�Z?d_�Z@RS(as�
    The canvas the figure renders into.

    Public attributes

        *figure*
            A :class:`matplotlib.figure.Figure` instance

      tresize_eventt
draw_eventtkey_press_eventtkey_release_eventtbutton_press_eventtbutton_release_eventtscroll_eventtmotion_notify_eventt
pick_eventt
idle_eventtfigure_enter_eventtfigure_leave_eventRJRItclose_eventcC s�|j|�||_tj�|_tj�|_d|_	d|_
d\|_|_|j
d|j�|_|j
d|j�|_d|_d|_tr�|j
d|j�ndS(NR^R`Ra(NN(t
set_canvasR?R�tCallbackRegistryRtwidgetstLockDrawt
widgetlockRt_buttont_keyt_lastxt_lastytmpl_connecttpicktbutton_pick_idtscroll_pick_idR>ttoolbarRtonHilite(RR?((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�s
					cC s�d�}||jj|��}d}|r:|d}nxj|r�td|�|j�rj|j�Pnd}x*|D]"}||j�krw|}PqwqwW|}q=WdS(s�
        Mouse event processor which removes the top artist
        under the cursor.  Connect this to the 'mouse_press_event'
        using::

            canvas.mpl_connect('mouse_press_event',canvas.onRemove)
        cS sIg|D]}|j|f^q}|j�g|D]\}}|^q3S(N(R:RB(tartistsR�tLR:((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytsort_artists�s"
i����tRemovingN(R?thitlistRtprintR&t	draw_idletget_children(RtevRxtunderR�tparenttp((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytonRemove�s 	
	


cC s�t|d�st�|_n|jj|�}g|D]}||jkr7|^q7}g|jD]}||krb|^qb}x�|D]x}t|d�r�|j|j|�nBt|d�r�|j|j|d�|j|j|d�n|j|=q�Wxq|D]i}t|d�r5|j�|j|<q
t|d�rf|j	�|j
�f|j|<q
d|j|<q
Wxf|D]^}t|d�r�|jd�q~t|d�r�|jd�|jd�q~d|j|<q~W|j�dS(	s�
        Mouse event processor which highlights the artists
        under the cursor.  Connect this to the 'motion_notify_event'
        using::

            canvas.mpl_connect('motion_notify_event',canvas.onHilite)
        t_activet	get_colort
get_edgecoloriitredt	lightblueN(
thasattrtdictR�R?Rzt	set_colort
set_edgecolort
set_facecolorR�R�t
get_facecolorRR|(RR~RRGtentertleave((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRu�s4((

"

cC s&|jj�s"|jj|�ndS(N(RktlockedR?Rq(RRT((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRqscC sdS(sA
        blit the canvas in bbox (default entire canvas)
        N((Rtbbox((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytblitscC sdS(s/
        set the canvas size in pixels
        N((RR�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytresizescC s/d}t|||�}|jj||�dS(sx
        This method will be call all functions connected to the
        'draw_event' with a :class:`DrawEvent`
        R[N(R5RRL(RR�R'tevent((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR[%scC s,d}t||�}|jj||�dS(s|
        This method will be call all functions connected to the
        'resize_event' with a :class:`ResizeEvent`
        RZN(R6RRL(RR'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRZ/scC sPd}y,t||d|�}|jj||�Wnttfk
rKnXdS(s
        This method will be called by all functions connected to the
        'close_event' with a :class:`CloseEvent`
        RfR3N(R7RRLt	TypeErrorR(RR3R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRf9scC sJ||_d}t||||j|jd|�}|jj||�dS(s|
        This method will be call all functions connected to the
        'key_press_event' with a :class:`KeyEvent`
        R\R3N(RmRXRnRoRRL(RR9R3R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR\Js	$cC sJd}t||||j|jd|�}|jj||�d|_dS(s~
        This method will be call all functions connected to the
        'key_release_event' with a :class:`KeyEvent`
        R]R3N(RXRnRoRRLRRm(RR9R3R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR]Ts$cK s5d}t|||||�}|jj||�dS(s�
        This method will be called by artists who are picked and will
        fire off :class:`PickEvent` callbacks registered listeners
        RbN(RSRRL(RRTRUR$R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRb^scC sk|dkrd|_n	d|_d}t|||||j|jd|d|�}|jj||�dS(sI
        Backend derived classes should call this function on any
        scroll wheel event.  x,y are the canvas coords: 0,0 is lower,
        left.  button and key are as defined in MouseEvent.

        This method will be call all functions connected to the
        'scroll_event' with a :class:`MouseEvent` instance.
        ituptdownR`RPR3N(RlRNRmRRL(RR;R<RPR3R'RT((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR`gs		cC sP||_d}t||||||jd|d|�}|jj||�dS(sX
        Backend derived classes should call this function on any mouse
        button press.  x,y are the canvas coords: 0,0 is lower, left.
        button and key are as defined in :class:`MouseEvent`.

        This method will be call all functions connected to the
        'button_press_event' with a :class:`MouseEvent` instance.

        R^RQR3N(RlRNRmRRL(RR;R<RORQR3R'RT((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR^zs

	c	C sJd}t||||||jd|�}|jj||�d|_dS(s�
        Backend derived classes should call this function on any mouse
        button release.

        *x*
            the canvas coordinates where 0=left

        *y*
            the canvas coordinates where 0=bottom

        *guiEvent*
            the native UI event that generated the mpl event


        This method will be call all functions connected to the
        'button_release_event' with a :class:`MouseEvent` instance.

        R_R3N(RNRmRRLRRl(RR;R<ROR3R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR_�s$c	C sW|||_|_d}t|||||j|jd|�}|jj||�dS(s�
        Backend derived classes should call this function on any
        motion-notify-event.

        *x*
            the canvas coordinates where 0=left

        *y*
            the canvas coordinates where 0=bottom

        *guiEvent*
            the native UI event that generated the mpl event


        This method will be call all functions connected to the
        'motion_notify_event' with a :class:`MouseEvent` instance.

        RaR3N(RnRoRNRlRmRRL(RR;R<R3R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRa�s
	cC s5|jjdtj�dt_d\|_|_dS(s�
        Backend derived classes should call this function when leaving
        canvas

        *guiEvent*
            the native UI event that generated the mpl event

        ReN(NN(RRLR8RKRRnRo(RR3((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytleave_notify_event�s
	cC sW|dk	r.|\}}|||_|_ntd||�}|jjd|�dS(s
        Backend derived classes should call this function when entering
        canvas

        *guiEvent*
            the native UI event that generated the mpl event
        *xy*
            the coordinate location of the pointer when the canvas is
            entered

        RdN(RRnRoR0RRL(RR3txyR;R<R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytenter_notify_event�s
cC s2d}t||d|�}|jj||�dS(sCalled when GUI is idle.RcR3N(R4RRL(RR3R'R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRc�scC s1|jd|fkr$td��n||_dS(s�
        Set the child axes which are currently grabbing the mouse events.
        Usually called by the widgets themselves.
        It is an error to call this if the mouse is already grabbed by
        another axes.
        s+two different attempted to grab mouse inputN(R>RtRuntimeError(Rtax((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
grab_mouse�scC s|j|krd|_ndS(s�
        Release the mouse grab held by the axes, ax.
        Usually called by the widgets.
        It is ok to call this even if you ax doesn't have the mouse grab currently.
        N(R>R(RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
release_mouse�scO sdS(s?
        Render the :class:`~matplotlib.figure.Figure`
        N((RR#R$((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw�scO s|j||�dS(sX
        :meth:`draw` only if idle; defaults to draw but backends can overrride
        N(R�(RR#R$((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR|�scC sdS(s�
        Draw a cursor in the event.axes if inaxes is not None.  Use
        native GUI drawing for efficiency if possible
        N((RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_cursorscC s(t|jjj�t|jjj�fS(s�
        Return the figure width and height in points or pixels
        (depending on the backend), truncated to integers
        (RR?R�R�R�(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�	ssEnhanced MetafiletemfsEncapsulated PostscripttepssPortable Document FormattpdfsLaTeX PGF FiguretpgfsPortable Network Graphicstpngt
PostscripttpssRaw RGBA bitmaptrawtrgbasScalable Vector GraphicstsvgtsvgzcO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasEMF(tbackends.backend_emfR�tswitch_backendst	print_emf(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�(scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasPS(tbackends.backend_psR�R�t	print_eps(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�-scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasPdf(tbackends.backend_pdfR�R�t	print_pdf(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�2scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasPgf(tbackends.backend_pgfR�R�t	print_pgf(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�7scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasAgg(tbackends.backend_aggR�R�t	print_png(RR#R$R�tagg((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�<scO s/ddlm}|j|�}|j||�S(Ni����(R�(R�R�R�tprint_ps(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�AscO s/ddlm}|j|�}|j||�S(Ni����(R�(R�R�R�t	print_raw(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�FscO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasSVG(tbackends.backend_svgR�R�t	print_svg(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�LscO s/ddlm}|j|�}|j||�S(Ni����(R�(R�R�R�t
print_svgz(RR#R$R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�Qss Joint Photographic Experts Grouptjpgtjpegc
O s�ddlm}|j|�}|j�\}}|jdt�rGdStjd||dddd�}tj	|d	d
dg�}	|j
|dd
|	�S(sN
            Supported kwargs:

            *quality*: The image quality, on a scale from 1 (worst) to
                95 (best). The default is 75. Values above 95 should
                be avoided; 100 completely disables the JPEG
                quantization stage.

            *optimize*: If present, indicates that the encoder should
                make an extra pass over the image in order to select
                optimal encoder settings.

            *progressive*: If present, indicates that this image
                should be stored as a progressive JPEG file.
            i����(R�tdryrunNtRGBAR�iitqualitytoptimizetprogressiveRR�(R�R�R�tprint_to_bufferR'RR	t
frombufferR�t
restrict_dicttsave(
Rtfilename_or_objR#R$R�R�tbufR�timagetoptions((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	print_jpgXs!sTagged Image File Formatttifttiffc
O s�ddlm}|j|�}|j�\}}|jdt�rGdStjd||dddd�}|jj	|jj	f}	|j
|dd	d
|	�S(Ni����(R�R�R�R�iiRR�R�(R�R�R�R�R'RR	R�R?R�R�(
RR�R#R$R�R�R�R�R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	print_tifss!cC s|jS(s=Return dict of savefig file formats supported by this backend(t	filetypes(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_supported_filetypes~scC sQi}xD|jj�D]3\}}|j|g�j|�||j�qW|S(sReturn a dict of savefig file formats supported by this backend,
        where the keys are a file type name, such as 'Joint Photographic
        Experts Group', and the values are a list of filename extensions used
        for that filetype, such as ['jpg', 'jpeg'].(R�t	iteritemst
setdefaultR?RB(Rt	groupingstextR1((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_supported_filetypes_grouped�s
c s�d|�|tkr9t|����fd�}|S�j�}||ksat���r�t|�}td|dj|�f��nt���S(Nsprint_%sc s+�j��}t|��}|||�S(N(R�tgetattr(R#R$tbackendtprint_method(Rtmethod_nameR(s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
_print_method�ss4Format "%s" is not supported.
Supported formats: %s.s, (R
R�R�tsortedR�tjoinR�(RRR�tformats((RR�Rs>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_get_print_method�s

R�tportraitcK ss|dkr�tj|�r8tjj|�dd}n|dksP|dkr�|j�}tj|�r�|jd�d|}q�q�n|j�}|j	|�}|dkr�t
d}n|jj}	|jj
�}
|jj�}||j_|jj|�|jj|�|jdd�}|dkr@t
d}n|r�|dkr�|tj�d|d	|d
|d|dt|�}
|jj}|jj|�}|jd
d�}|dkr�|jj�}ng|D]}|j|�^q�}g|D]*}|jdks |jdkr�|^q�}|r~tj|�}t|t�jd|jj��}tj||g�}n|jdd�}|dkr�t
d}n|j |�}nt!j"|j||�}||f}nd}z1||d|d	|d
|d|d||�}
Wd|r2|r2|�n|	|j_|jj|
�|jj|�|jj#|�X|
S(s
        Render the figure to hardcopy. Set the figure patch face and edge
        colors.  This is useful because some of the GUIs have a gray figure
        face color background and you'll probably want to override this on
        hardcopy.

        Arguments are:

        *filename*
            can also be a file object on image backends

        *orientation*
            only currently applies to PostScript printing.

        *dpi*
            the dots per inch to save the figure in; if None, use savefig.dpi

        *facecolor*
            the facecolor of the figure

        *edgecolor*
            the edgecolor of the figure

        *orientation*
            landscape' | 'portrait' (not supported on all backends)

        *format*
            when set, forcibly set the file format to save to

        *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. If None, use savefig.bbox

        *pad_inches*
            Amount of padding around the figure when bbox_inches is
            'tight'. If None, use savefig.pad_inches

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

        itt.ssavefig.dpitbbox_inchesssavefig.bboxttightR�t	facecolort	edgecolortorientationR�tbbox_extra_artistsig�?t
pad_inchesssavefig.pad_inchestbbox_inches_restoreN($RR�tis_string_liketosR-tsplitexttget_default_filetypetrstriptlowerR�RR?R�R�R�R�R�R'tiotBytesIOR�t_cachedRenderert
get_tightbboxtget_default_bbox_extra_artiststget_window_extentR�R�RtunionRRR�tpaddedt
tight_bboxtadjust_bboxRg(RtfilenameR�R�R�R�RR$R�torigDPIt
origfacecolort
origedgecolorR�tresultR�R�RGtbbR�t
bbox_filteredt_bboxtbbox_inches1tpadtrestore_bboxt_bbox_inches_restore((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytprint_figure�s�- 

	"7
	

cC stdS(s�
        Get the default savefig file format as specified in rcParam
        ``savefig.format``. Returned string excludes period. Overridden
        in backends that only support a single file type.
        ssavefig.format(R(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�9scC s t|d�r|jj�SdS(s�
        Get the title text of the window containing the figure.
        Return None if there is no window (eg, a PS backend).
        RN(R�Rtget_window_title(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRAscC s&t|d�r"|jj|�ndS(s�
        Set the title text of the window containing the figure.  Note that
        this has no effect if there is no window (eg, a PS backend).
        RN(R�Rtset_window_title(Rttitle((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRIscC s<|j�pd}|j�jdd�}|d|j�S(sl
        Return a string, which includes extension, suitable for use as
        a default filename.
        R�t t_R�(RR�treplaceR�(Rtdefault_filename((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_default_filenameQscC s||j�}|S(sO
        Instantiate an instance of FigureCanvasClass

        This is used for backend switching, eg, to instantiate a
        FigureCanvasPS from a FigureCanvasGTK.  Note, deep copying is
        not done, so any changes to one of the instances (eg, setting
        figure size or line props), will be reflected in the other
        (R?(RtFigureCanvasClasst	newCanvas((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�Zs	cC s|jj||�S(s�
        Connect event with string *s* to *func*.  The signature of *func* is::

          def func(event)

        where event is a :class:`matplotlib.backend_bases.Event`.  The
        following events are recognized

        - 'button_press_event'
        - 'button_release_event'
        - 'draw_event'
        - 'key_press_event'
        - 'key_release_event'
        - 'motion_notify_event'
        - 'pick_event'
        - 'resize_event'
        - 'scroll_event'
        - 'figure_enter_event',
        - 'figure_leave_event',
        - 'axes_enter_event',
        - 'axes_leave_event'
        - 'close_event'

        For the location events (button and key press/release), if the
        mouse is over the axes, the variable ``event.inaxes`` will be
        set to the :class:`~matplotlib.axes.Axes` the event occurs is
        over, and additionally, the variables ``event.xdata`` and
        ``event.ydata`` will be defined.  This is the mouse location
        in data coords.  See
        :class:`~matplotlib.backend_bases.KeyEvent` and
        :class:`~matplotlib.backend_bases.MouseEvent` for more info.

        Return value is a connection id that can be used with
        :meth:`~matplotlib.backend_bases.Event.mpl_disconnect`.

        Example usage::

            def on_press(event):
                print('you pressed', event.button, event.xdata, event.ydata)

            cid = canvas.mpl_connect('button_press_event', on_press)

        (Rtconnect(RR'R"((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRpfs-cC s|jj|�S(s�
        Disconnect callback id cid

        Example usage::

            cid = canvas.mpl_connect('button_press_event', on_press)
            #...later
            canvas.mpl_disconnect(cid)
        (Rt
disconnect(Rtcid((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytmpl_disconnect�s
cO s
t||�S(s�
        Creates a new backend-specific subclass of :class:`backend_bases.Timer`.
        This is useful for getting periodic events through the backend's native
        event loop. Implemented only for backends with GUIs.

        optional arguments:

        *interval*
          Timer interval in milliseconds
        *callbacks*
          Sequence of (func, args, kwargs) where func(*args, **kwargs) will
          be executed by the timer every *interval*.
        (R(RR#R$((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	new_timer�scC s
t�dS(sg
        Flush the GUI events for the figure. Implemented only for
        backends with GUIs.
        N(R+(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytflush_events�scC s
t�dS(s|
        Start an event loop.  This is used to start a blocking event
        loop so that interactive functions, such as ginput and
        waitforbuttonpress, can wait for events.  This should not be
        confused with the main GUI event loop, which is always running
        and has nothing to do with this.

        This is implemented only for backends with GUIs.
        N(R+(Rttimeout((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart_event_loop�s
cC s
t�dS(s�
        Stop an event loop.  This is used to stop a blocking event
        loop so that interactive functions, such as ginput and
        waitforbuttonpress, can wait for events.

        This is implemented only for backends with GUIs.
        N(R+(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_event_loop�sicC s�d}|d7}tj|t�|dkr8tj}nd}d}t|_x>|jr�|||kr�|j�tj	|�|d7}qPWdS(s'
        Start an event loop.  This is used to start a blocking event
        loop so that interactive functions, such as ginput and
        waitforbuttonpress, can wait for events.  This should not be
        confused with the main GUI event loop, which is always running
        and has nothing to do with this.

        This function provides default event loop functionality based
        on time.sleep that is meant to be used until event loop
        functions for each of the GUI backends can be written.  As
        such, it throws a deprecated warning.

        Call signature::

            start_event_loop_default(self,timeout=0)

        This call blocks until a callback function triggers
        stop_event_loop() or *timeout* is reached.  If *timeout* is
        <=0, never timeout.
        s0Using default event loop until function specifics to this GUI is implementedig{�G�z�?iN(
twarningstwarntDeprecationWarningRXtinfR�t_loopingRttimetsleep(RRRttimesteptcounter((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart_event_loop_default�s
	

cC s
t|_dS(s�
        Stop an event loop.  This is used to stop a blocking event
        loop so that interactive functions, such as ginput and
        waitforbuttonpress, can wait for events.

        Call signature::

          stop_event_loop_default(self)
        N(RR%(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_event_loop_default�s
N(ARRR teventsR&R�RuRqRR�R�R[RZRfR\R]RbR`RR^R_RaR�R�RcR�R�R�R|R�R�R�R�R�R�R�R�R�R�t	print_bmpt	print_rgbR�R�t_has_pilR�t
print_jpegR�t
print_tiffR�R�R�R
R�RRRR�RpRRRRR R*R+(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRY�s�				"	+			
	


									
							
										�							/					
"cC s�|jdkrdStd}td}td}td}td}td}td}	td	}
td
}td}td}
td
}|j|kr�|jj�n|j|
kr�tj|j�n|dk	r�|j|kr�|j�q�|j|kr|j	�q�|j|kr,|j
�q�|j|krH|j�q�|j|krd|j�q�|j|	kr�|j
�q�n|jdkr�dS|j|kr�|jj�|j�n�|j|kr>|j}|j�}|dkr|jd�|jjj�q�|dkr�|jd�|jjj�q�n\|j|
kr�|j}|j�}|dkr�|jd�|jjj�q�|dkr�|jd�|jjj�q�n�|jj�r�|jdks�|j|kr�|j|krt|j�d}nx�t|jj��D]n\}}|jdk	r%|jdk	r%|j|�r%|j|kr}|jt�q�|j||k�q%q%WndS(s
    Implement the default mpl key bindings for the canvas and toolbar
    described at :ref:`key-event-handling`

    *event*
      a :class:`KeyEvent` instance
    *canvas*
      a :class:`FigureCanvasBase` instance
    *toolbar*
      a :class:`NavigationToolbar2` instance

    Nskeymap.fullscreenskeymap.homeskeymap.backskeymap.forwards
keymap.panskeymap.zoomskeymap.saveskeymap.quitskeymap.grids
keymap.yscales
keymap.xscaleskeymap.all_axestlogtlineart0i(R9RRRtfull_screen_toggleRtdestroy_figR?thometbacktforwardtpantzoomtsave_figureR<tgridR�t
get_yscalet
set_yscaleR2t
get_xscalet
set_xscaletisdigitRt	enumerateR@R;R<RAtset_navigateR�(R�R2Rttfullscreen_keyst	home_keyst	back_keystforward_keystpan_keyst	zoom_keyst	save_keyst	quit_keyst	grid_keysttoggle_yscale_keysttoggle_xscale_keystallR�R�tscalextnRqRG((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytkey_press_handler�s~


















	

	

-"tNonGuiExceptioncB seZRS((RR(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRTh	stFigureManagerBasecB s_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
s�
    Helper class for pyplot mode, wraps everything up into a neat bundle

    Public attibutes:

    *canvas*
        A :class:`FigureCanvasBase` instance

    *num*
        The figure number
    cC s:||_||_||_|jjd|j�|_dS(NR\(R2RtnumRpt	key_presstkey_press_handler_id(RR2RV((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&w	s				cC s
t��dS(s�
        For GUI backends, show the figure window and redraw.
        For non-GUI backends, raise an exception to be caught
        by :meth:`~matplotlib.figure.Figure.show`, for an
        optional warning.
        N(RT(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�	scC sdS(N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdestroy�	scC sdS(N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR5�	scC sdS(s1"For gui backends, resize the window (in pixels).N((RR�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��	scC st||j|jj�dS(se
        Implement the default mpl key bindings defined at
        :ref:`key-event-handling`
        N(RSR2Rt(RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRW�	scC sdS(s8
        Display message in a popup -- GUI only
        N((Rtmsg((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
show_popup�	scC sdS(s�
        Get the title text of the window containing the figure.
        Return None for non-GUI backends (eg, a PS backend).
        R�((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�	scC sdS(s�
        Set the title text of the window containing the figure.  Note that
        this has no effect for non-GUI backends (eg, a PS backend).
        N((RR((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�	s(RRR R&RRYR5R�RWR[RR(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRUk	s									tCursorscB s eZed�\ZZZZRS(i(RRtrangetHANDtPOINTERt
SELECT_REGIONtMOVE(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR\�	stNavigationToolbar2cB s+eZdZd6d7d8d:d;d<d=d>d?f	Zd�Zd�Zd�Zd�Zd�Z	d�Z
d �Zd!�Zd"�Z
d#�Zd$�Zd%�Zd&�Zd'�Zd(�Zd)�Zd*�Zd+�Zd,�Zd-�Zd.�Zd/�Zd0�Zd1�Zd2�Zd3�Zd4�Zd5�Z RS(@s�
    Base class for the navigation cursor, version 2

    backends must implement a canvas that handles connections for
    'button_press_event' and 'button_release_event'.  See
    :meth:`FigureCanvasBase.mpl_connect` for more information


    They must also define

      :meth:`save_figure`
         save the current figure

      :meth:`set_cursor`
         if you want the pointer icon to change

      :meth:`_init_toolbar`
         create your toolbar widget

      :meth:`draw_rubberband` (optional)
         draw the zoom to rect "rubberband" rectangle

      :meth:`press`  (optional)
         whenever a mouse button is pressed, you'll be notified with
         the event

      :meth:`release` (optional)
         whenever a mouse button is released, you'll be notified with
         the event

      :meth:`dynamic_update` (optional)
         dynamically update the window while navigating

      :meth:`set_message` (optional)
         display message

      :meth:`set_history_buttons` (optional)
         you can change the history back / forward buttons to
         indicate disabled / enabled state.

    That's it, we'll do the rest!
    tHomesReset original viewR7tBacksBack to  previous viewR8tForwardsForward to next viewR9tPans)Pan axes with left mouse, zoom with righttmoveR:tZoomsZoom to rectangletzoom_to_rectR;tSubplotssConfigure subplotstsubplotstconfigure_subplotstSavesSave the figuretfilesaveR<cC s�||_||_tj�|_tj�|_d|_d|_d|_	d|_
d|_|j�|jj
d|j�|_g|_d|_d|_d|_|j�dS(NRaR�(R2RtR�tStackt_viewst
_positionsRt_xypresst_idPresst
_idReleaseR�t_lastCursort
_init_toolbarRpt
mouse_movet_idDragt	_ids_zoomt
_zoom_modet_button_pressedtmodetset_history_buttons(RR2((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&�	s 							
				cC sdS(s-Display a message on toolbar or in status barN((RR'((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_message
scG s2|jj�|jj�|j�|j�dS(smove back up the view lim stackN(RpR8RqR}t_update_view(RR#((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR8
s


cC sdS(N((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdynamic_update
scC sdS(s3Draw a rectangle rubberband to indicate zoom limitsN((RR�tx0ty0tx1ty1((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_rubberband 
scG s2|jj�|jj�|j�|j�dS(s"Move forward in the view lim stackN(RpR9RqR}R(RR#((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR9$
s


cG s2|jj�|jj�|j�|j�dS(sRestore the original viewN(RpR7RqR}R(RR#((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR7+
s


cC s
t�dS(s�
        This is where you actually build the GUI widgets (called by
        __init__).  The icons ``home.xpm``, ``back.xpm``, ``forward.xpm``,
        ``hand.xpm``, ``zoom_to_rect.xpm`` and ``filesave.xpm`` are standard
        across backends (there are ppm versions in CVS also).

        You just need to set the callbacks

        home         : self.home
        back         : self.back
        forward      : self.forward
        hand         : self.pan
        zoom_to_rect : self.zoom
        filesave     : self.save_figure

        You only need to define the last one - the others are in the base
        class implementation.

        N(R+(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRv2
sc	C sl|js|jrH|jtjkr�|jtj�tj|_q�n�|jdkr�|jtjkr�|jtj�tj|_q�n@|jdkr�|jtjkr�|jtj�tj|_n|jrX|jj�rXy|jj	|j
|j�}Wntt
fk
rqhXt|j�rH|jd|j|f�qh|j|�n|j|j�dS(NtZOOMtPANs%s, %s(R<R�RutcursorsR_t
set_cursorR`Ratget_navigatetformat_coordRERFR�t
OverflowErrorR3R|R~(RR�R'((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRwH
s*cG s9|jdkrd|_n	d|_|jdk	rW|jj|j�|_d|_n|jdk	r�|jj|j�|_d|_n|jr�|jjd|j�|_|jjd|j	�|_d|_|jj
|�n|jj
j|�x*|jjj
�D]}|j|j�qW|j|j�dS(sAActivate the pan/zoom tool. pan with left button, zoom with rightR�R�R^R_span/zoomN(R�RRsR2RR|RtRpt	press_pantrelease_panRktreleaseR?R@tset_navigate_modeR~(RR#RG((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR:e
s(					cC sdS(s)Called whenver a mouse button is pressed.N((RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytpress�
sc	C sQ|jdkrd|_n(|jdkr6d|_n
d|_dS|j|j}}|jj�rr|j�ng|_x�t	|j
jj��D]�\}}|dk	r�|dk	r�|j
|�r�|j�r�|j�r�|j|||j�|jj||f�|j
j|j�|j
jd|j�|_q�q�W|j|�dS(s0the press mouse button in pan/zoom mode callbackiiNRa(ROR{RR;R<Rptemptytpush_currentRrRCR2R?R@RAR�tcan_pant	start_panR?RRxRptdrag_panR�(RR�R;R<RqRG((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
s&	
	%'c	C s�|jdkrd|_n(|jdkr6d|_n
d|_dS|j|j}}|jj�rr|j�ng|_x�t	|j
jj��D]�\}}|dk	r�|dk	r�|j
|�r�|j�r�|j�r�|jj|||||jj�|jj�f�q�q�W|j
jd|j�}|j
jd|j�}|j
jd|j�}|||f|_|j|_|j|�dS(s4the press mouse button in zoom to rect mode callbackiiNRaR\R](ROR{RR;R<RpR�R�RrRCR2R?R@RAR�tcan_zoomR?tviewLimRdRCRpt	drag_zoomt_switch_on_zoom_modet_switch_off_zoom_modeRyR9RzR�(	RR�R;R<RqRGtid1tid2tid3((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
press_zoom�
s.	
	%'!cC s|j|_|j|�dS(N(R9RzRw(RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
scC sd|_|j|�dS(N(RRzRw(RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
s	cC s�g}g}x�|jjj�D]q}|j�\}}|j�\}}|j||||f�|j|jt�j�|j�j�f�qW|j	j
|�|jj
|�|j�dS(s8push the current view limits and position onto the stackN(
R2R?R@tget_xlimtget_ylimR?tget_positionR�RdRptpushRqR}(RtlimstposRGtxmintxmaxtymintymax((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
scC sdS(s5this will be called whenever mouse button is releasedN((RR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
scC s�|jdkrdS|jj|j�|jjd|j�|_x!|jD]\}}|j�qKW|jsrdSg|_d|_|j	�|j
|�|j�dS(s2the release mouse button callback in pan/zoom modeNRa(R{RR2RRxRpRwRrtend_panR�R�R�(RR�RGtind((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
s			

cC sJx9|jD].\}}|j|j|j|j|j�q
W|j�dS(s"the drag callback in pan/zoom modeN(RrR�R{R9R;R<R�(RR�RGR�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
s&cC sC|jr?|j|j}}|jd\}}}}}}	|jj\}
}}}
tt||�|
�tt||�|�}}tt||�|�tt||�|
�}}|jdkr�|jj\}
}}}
||
}}n7|jdkr#|jj\}
}}}
|
|}}n|j|||||�ndS(sthe drag callback in zoom modeiR;R<N(	RrR;R<R�textentsRktminRzR�(RR�R;R<tlastxtlastyRGR�tlimR8R�R�tx2ty2((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��
s	11cC s�x!|jD]}|jj|�q
Wg|_|js:dSg}xT|jD]I}|j|j}}|\}}}	}
}}t||�dks�t||�dkr�d|_|j|�|j	�dS|j
\}
}}}|	jj�}|j
||f�\}}|j
||f�\}}|	j�\}}|	j�\}}tt}}|r�xS|D]H}|	j�j|	|�r�t}n|	j�j|	|�rct}qcqcWn|j|	�|r�||}
}n�||kr7||kr�||}
}n
||}
}|
|kr|}
n||kr�|}q�nS||krS||}
}n
||}
}|
|kru|}
n||kr�|}n|r�||}}n�||kr||kr�||}}n
||}}||kr�|}n||krU|}qUnS||kr||}}n
||}}||kr@|}n||krU|}n|jdkr�|jdkr�|	j|
|f�q�|jdkr�|	j||f�q�|	j|
|f�|	j||f�qJ|jdkrJ|	j�dkrMtj||�tj||
�}t||
|�|}t||
|�|}n6||||
}|||
|}|||
|}|	j�dkr�tj||�tj||�}t|||�|}t|||�|}n6||||}||||}||||}|jdkrE|	j||f�q�|jdkrj|	j||f�q�|	j||f�|	j||f�qJqJW|j	�d|_d|_d|_|j�|j|�dS(s6the release mouse button callback in zoom to rect modeNiiR;R<iR2( RyR2RRrR;R<tabsRR�R�R�RCRDRvR�R�Rtget_shared_x_axestjoinedR�tget_shared_y_axesR?R{Rztset_xlimtset_ylimR@RXR2tpowR>R�(RR�tzoom_idtlast_atcur_xypressR;R<R�R�RGR�R�R8R�R�R�R�tinversetXmintXmaxtYmintYmaxttwinxttwinytlaR�trx1trx2try1try2((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pytrelease_zooms�		,	



	

	
		
	
		$$
			
cC s�x�|jjj�D]�}t|dd�}t|dd�}g}|dk	rx|j|j��|j|j��n|dk	r�|j|j��|j|j��nx|D]}|j�q�WqW|jj	�dS(s(Redraw the canvases, update the locatorstxaxistyaxisN(
R2R?R@R�RR?tget_major_locatortget_minor_locatortrefreshR�(RRGR�R�tlocatorstloc((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�{s
c	C s�|j�}|dkrdS|j�}|dkr8dSx�t|jjj��D]x\}}||\}}}}|j||f�|j||f�|j	||dd�|j	||dd�qQW|j
�dS(s_Update the viewlim and position from the view and
        position stack for each axes
        Nitoriginalitactive(RpRRqRCR2R?R@R�R�tset_positionR�(	RR�R�RqRGR�R�R�R�((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�s%cG s
t�dS(sSave the current figureN(R+(RR#((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR<�scC sdS(s\
        Set the current cursor to one of the :class:`Cursors`
        enums values
        N((Rtcursor((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scC s(|jj�|jj�|j�dS(sReset the axes stackN(RptclearRqR}(R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRW�s

cG s9|jdkrd|_n	d|_|jdk	rW|jj|j�|_d|_n|jdk	r�|jj|j�|_d|_n|jr�|jjd|j�|_|jjd|j	�|_d|_|jj
|�n|jj
j|�x*|jjj
�D]}|j|j�qW|j|j�dS(sActivate zoom to rect modeR�R�R^R_s	zoom rectN(R�RRsR2RR|RtRpR�R�RkR�R?R@R�R~(RR#RG((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR;�s$			cC sdS(s%Enable or disable back/forward buttonN((R((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR}�s(RcsReset original viewshomeshome(RdsBack to  previous viewsbacksback(ResForward to next viewsforwardsforwardN(NNNN(Rfs)Pan axes with left mouse, zoom with rightRgspan(RhsZoom to rectangleRiszoom(NNNN(RjsConfigure subplotsRkRl(RmsSave the figureRnssave_figure(!RRR Rt	toolitemsR&R~R8R�R�R9R7RvRwR:R�R�R�R�R�R�R�R�R�R�R�R�RR<R�RWR;R}(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRb�	sL*
											 			!									l						(@R t
__future__RRR�R!R&R�tnumpyRXtmatplotlib.cbookR�tmatplotlib.colorsRbtmatplotlib.transformsR4tmatplotlib.widgetsRiRRRtmatplotlib._pylab_helpersRRRRt	cStringIOtmatplotlib.tight_bboxR�tmatplotlib.textpathR#tmatplotlib.pathRtPILR	R�R/tImportErrorRR
R
tobjectRR!R�RR0R4R5R6R7R8RNRSRXRYRRSt	ExceptionRTRUR\R�Rb(((s>/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt<module>s`0


	5��!�=�
i7(%���hkL	

Anon7 - 2021