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/backend_bases.pyc
�
�)�Uc@ s�dZddlmZddlZddlZddlZddlZddlj	Z	ddl
jZddlj
Z
ddljZddlmZddlmZddlmZddlmZmZmZddlZddljZddljZddlmZiZd	�Z d
e!fd��YZ"dfd
��YZ#dfd��YZ$de!fd��YZ%dfd��YZ&de&fd��YZ'de&fd��YZ(de&fd��YZ)de&fd��YZ*de&fd��YZ+de+fd��YZ,d e&fd!��YZ-d"e+fd#��YZ.d$fd%��YZ/d&fd'��YZ0d(fd)��YZ1e1�Z2d*fd+��YZ3dS(,s�
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����(tdivisionN(trcParams(tis_interactive(tGcf(tBboxtTransformedBboxtAffine2D(tPathcC s|t|<dS(N(t
_backend_d(tformatt
backend_class((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytregister_backend7stShowBasecB s eZdZd�Zd�ZRS(su
    Simple base class to generate a show() callable in backends.

    Subclass must override mainloop() method.
    cC sptj�}|sdSx|D]}|j�qWy|jsAdSWntk
rUnXt�sl|j�ndS(s#
        Show all figures.
        N(Rtget_all_fig_managerstshowt	_needmaintAttributeErrorRtmainloop(tselftmanagerstmanager((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt__call__As
	
	cC sdS(N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRUs(t__name__t
__module__t__doc__RR(((sK/opt/alt/python27/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(tNonet_texmanagerttextpatht
TextToPatht
_text2path(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt__init__ks	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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
open_grouppscC sdS(s�
        Close a grouping element with label *s*
        Is only currently used by :mod:`~matplotlib.backends.backend_svg`
        N((RR ((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytclose_groupxscC s
t�dS(sk
        Draws a :class:`~matplotlib.path.Path` instance using the
        given affine transform.
        N(tNotImplementedError(Rtgctpatht	transformtrgbFace((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	draw_pathscC 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_segmentstFalsetlenR)t
transformsRt	translate(RR%tmarker_pathtmarker_transR&ttransR(tverticestcodestxty((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_markers�s"c
C s�g}
x6|j|||�D]\}}|
j||f�qWx�|j||
|||||	|
||�
D]X\}}}}}|\}}tj|j��j||�}|j||||�qjWdS(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.

        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_collectionR.Rt
get_matrixR/R)(RR%tmaster_transformtpathstall_transformstoffsetstoffsetTranst
facecolorst
edgecolorst
linewidthst
linestylestantialiasedsturlstpath_idsR&R'txotyotpath_idtgc0R(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_path_collection�s		%!c
C s�ddlm}|j|||�}|
rptjddddggtj�}
tj|j�gtj�}n$|}
tj|j�gtj�}|j|||g||||
|g|	gdg�S(s�
        This provides a fallback implementation of
        :meth:`draw_quad_mesh` that generates paths and then calls
        :meth:`draw_path_collection`.
        i����(tQuadMeshgg�?N(	tmatplotlib.collectionsRMtconvert_mesh_to_pathstnptarraytfloat_t
get_linewidthRLR(RR%R<t	meshWidtht
meshHeighttcoordinatesR?R@RAtantialiasedt	showedgesRMR=RBRC((sK/opt/alt/python27/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'((sK/opt/alt/python27/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(tfrozentzipR\(RR%ttriangles_arraytcolors_arrayR'ttritcol((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_gouraud_triangles�s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(R-tmaxR.tIdentityTransformtxrange(
RR<R=R>tNpathstNtransformstNR'tiR&((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR8�sc
c s�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]v}|||}|rC|||\}}n|rZ|||}n|r�|||}|dkr�t|�dkr�|j|d�n|j	|�|r�|j|||�n|r�|j
|||�q�n|dk	rAt|�dkrA|ddkr#d}qA|j|d�|d }n|j|	||�|rt|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.
        iNgii(ii(R-RdR'tnew_gctcopy_propertiesRt
set_linewidthRft	set_alphatset_foregroundt
set_dashestset_antialiasedtset_urltrestore(RR%RGR?R@RARBRCRDRERFRgtNoffsetsRitNfacecolorstNedgecolorstNlinewidthstNlinestylestNaatNurlsttoffsetsRKR(RHRIRjRJtfg((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR:sZ$
	
	
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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_image_magnificationiscC 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%R5R6tim((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
draw_imageqscC stS(s�
        override this method for renderers that do not necessarily
        want to rescale and composite raster images. (like SVG)
        (R,(R((sK/opt/alt/python27/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((sK/opt/alt/python27/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%R5R6R tproptangleR�((sK/opt/alt/python27/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%R5R6R R�R�R�((sK/opt/alt/python27/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���!	@(Rtpoints_to_pixelstget_size_in_pointst
get_text_pathR,tTrueRtflipyRtscalet
FONT_SCALEtrotateR/theight(
RR5R6R R�R�R�t	text2pathtfontsizetvertsR4R&R'((sK/opt/alt/python27/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_rgbRmR)(RR%R5R6R R�R�R�R&R'tcolor((sK/opt/alt/python27/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�Rtget_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((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�scC sdS(s4return the canvas width and height in display coordsi(ii((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_canvas_width_height&scC s5|jdkr.ddlm}|�|_n|jS(sO
        return the :class:`matplotlib.texmanager.TexManager` instance
        i����(t
TexManagerN(RRtmatplotlib.texmanagerR�(RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�*scC st�S(sF
        Return an instance of a :class:`GraphicsContextBase`
        (tGraphicsContextBase(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRk4scC 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
        ((RRZ((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�:scC s
tj|�S(N(tcbookt
strip_math(RR ((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�KscC sdS(sK
        Used in MixedModeRenderer. Switch to the raster renderer.
        N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart_rasterizingNscC 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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_rasterizingTscC sdS(sj
        Used in AggRenderer. Switch to a temporary renderer for image
        filtering effects.
        N((R((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_filtercsN(#RRRRRR"R#R)R7RLRYR\RcR8R:R}RR�R�R�R,R�R�R�R�R�R�R�RkR�R�R�R�R�R�(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRZs>			#		
			Q				$	'		#			
						R�cB s_eZdZid*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�Zed�Zd �Zd!�Zd"�Zd#�Zd$�Z d%�Z!d&�Z"d'�Z#dd(�Z$RS(.sI
    An abstract base class that provides color, line styles, etc...
    tsolidig@tdashedg@g@g�?tdashdottdottedcC syd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
dS(	Ng�?itbutttroundR�g(NN(ggg(t_alphat_antialiasedt	_capstyleRt	_cliprectt	_clippatht_dashest
_joinstylet
_linestylet
_linewidtht_rgbt_hatcht_urlt_snap(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRzs												cC s�|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�(RR%((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRl�scC sdS(s�
        Restore the graphics context from the stack - needed only
        for backends that save graphics contexts on a stack
        N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRs�scC s|jS(sb
        Return the alpha value used for blending - not supported on
        all backends
        (R�(R((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRS�scC s|jS(s�
        returns a tuple of three floats from 0-1.  color can be a
        MATLAB format string, a html hex color string, or a rgb tuple
        (R�(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scC s|jS(s=
        returns a url if one is set, None otherwise
        (R�(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_url�scC 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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_snap�scC s"|dkrd}n||_dS(s_
        Set the alpha value used for blending - not supported on
        all backends
        g�?N(RR�(Rtalpha((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRn�s	cC s|rd|_n	d|_dS(sK
        True if object should be drawn with antialiased rendering
        iiN(R�(Rtb((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRqs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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_capstylescC s
||_dS(sT
        Set the clip rectangle with sequence (left, bottom, width, height)
        N(R�(Rt	rectangle((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_clip_rectanglescC s1|dks$t|tj�s$t�||_dS(s�
        Set the clip path and transformation.  Path should be a
        :class:`~matplotlib.transforms.TransformedPath` instance.
        N(Rt
isinstanceR.tTransformedPathtAssertionErrorR�(RR&((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_clip_paths$cC 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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRp&scC s+|r||_ntjj|�|_dS(s�
        Set the foreground color.  fg can be a MATLAB format string, a
        html hex color string, an rgb unit tuple, or a float between 0
        and 1.  In the latter case, grayscale is used.

        The :class:`GraphicsContextBase` converts colors to rgb
        internally.  If you know the color is rgb already, you can set
        ``isRGB=True`` to avoid the performace hit of the conversion
        N(R�R[tcolorConvertertto_rgba(RR|tisRGB((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRo3s
cC s|||f|_dS(sI
        Set the foreground color to be a gray level with *frac*
        N(R�(Rtfrac((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_graylevelBscC 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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_joinstyleHscC s
||_dS(s-
        Set the linewidth in points
        N(R�(RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRmQscC sNy|j|\}}Wntd|��nX||_|j||�dS(sb
        Set the linestyle to be one of ('solid', 'dashed', 'dashdot',
        'dotted').
        sUnrecognized linestyle: %sN(tdashdR�R�Rp(RR�toffsettdashes((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
set_linestyleWs	cC s
||_dS(s?
        Sets the url for links in compatible backends
        N(R�(Rturl((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRrcscC 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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_snapiscC s
||_dS(s2
        Sets the hatch style for filling
        N(R�(Rthatch((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	set_hatchvscC s|jS(s.
        Gets the current hatch style
        (R�(R((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_hatch_path�sN(NN(g@g@(g@g@g�?g@(g�?g@(%RRRRR�RRlRsR�R�R�R�R�R�R�R�RSR�R�R�RnRqR�R�R�RpR,RoR�R�RmR�RrR�R�R�R�(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�msJ

								
							
									
							
		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(s�
    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	_intervalR,t_singlet_timer(RtintervalR�((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart�scC s|j�dS(s!
        Stop the timer.
        N(R(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop�scC sdS(N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�scC sdS(N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�scC s|jS(N(R(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
_get_interval�scC s#t|�}||_|j�dS(N(tintRt_timer_set_interval(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
_set_interval�s	cC s|jS(N(R(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_get_single_shot�scC s||_|j�dS(N(Rt_timer_set_single_shot(Rtss((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_set_single_shot�s	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(R�R9(Rtfunctargstkwargs((sK/opt/alt/python27/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(R�tremovetpoptindex(RRRRtctfuncs((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytremove_callback�s
 cC sdS(s0Used to set interval on underlying timer object.N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�scC sdS(s3Used to set single shot on underlying timer object.N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRscC 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(R�R,RR-R	(RRRRtret((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt	_on_timers N(RRRRRRRR	RRR
R
tpropertyRRR�Rtsingle_shotRRRRR(((sK/opt/alt/python27/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(RR!R"R#((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR%s		N(RRRRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR st	IdleEventcB seZdZRS(sc
    An event triggered by the GUI backend when it is idle -- useful
    for passive animation
    (RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR$*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(R RR�(RR!R"R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR;s(RRRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR%1s	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(R RR�R�R�(RR!R"((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRLs(RRRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR&?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(R R(RR!R"R#((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRVsN(RRRRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR'Pst
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

    cC s�tj|||d|�||_||_|dksC|dkrZd|_|j�dS|jjdkr�g|jj	j
�D]}|j|�r|^q}n|jjg}t|�dkr�d|_|j�dSt|�dkrd�}|j
|�|d|_n
|d|_y+|jjj�j||f�\}	}
Wn#tk
rpd|_d|_nX|	|_|
|_|j�dS(s?
        *x*, *y* in figure coords, 0,0 = bottom, left
        R#NiicS st|j|j�S(N(tcmptzorder(t_xt_y((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt<lambda>�si����(R RR5R6Rtinaxest_update_enter_leaveR"t
mouse_grabbertfiguretget_axestin_axesR-tsortt	transDatatinvertedttransform_pointR�txdatatydata(RR!R"R5R6R#tat	axes_listtaxCmpR8R9((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR|s6			
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(R(t	lasteventRR.R"R�tprocess(Rtlast((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR/�s	N(RRRRR5R6R.R8R9R?RR/(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR(Ys,t
MouseEventcB sMeZdZdZdZdZdZdZdZ	dZ
ddddd�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 pressed: None, chr(range(255), 'shift', 'win', or 'control'

    *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 s>tj|||||d|�||_||_||_dS(sn
        x, y in figure coords, 0,0 = bottom, left
        button pressed None, 1, 2, 3, 'up', 'down'
        R#N(R(Rtbuttontkeytstep(	RR!R"R5R6RCRDRER#((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�s		N(RRRRR5R6RCR.R8R9RER(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRB�st	PickEventcB seZdZdd�ZRS(sw
    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(R Rt
mouseeventtartistt__dict__tupdate(RR!R"RGRHR#R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRs		N(RRRRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRF�s tKeyEventcB s eZdZdddd�ZRS(sj
    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 pressed: None, chr(range(255), shift, win, or control

    This interface may change slightly when better support for
    modifier keys is included.


    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(NR#(R(RRD(RR!R"RDR5R6R#((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR4sN(RRRRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRKstFigureCanvasBasecB sseZdZddddddddd	d
ddd
ddgZd�Zd�Zd�Zd�ZdSd�Z	d�Z
d�Zd�ZdSd�Z
dSd�ZdSd�Zd�ZdSd�ZdSd�ZdSd�ZdSd�ZdSd �ZdSd!�ZdSd"�Zd#�Zd$�Zd%�Zd&�Zd'�Zd(�Zi	d)d*6d+d,6d-d.6d/d06d1d26d3d46d3d56d6d76d6d86Zd9�Zd:�Z d;�Z!d<�Z"d=�Z#d>�Z$e$Z%Z&d?�Z'd@�Z(dA�Z)dB�Z*dC�Z+dSdDdDdEdSdF�Z,dG�Z-dH�Z.dI�Z/dJ�Z0dK�Z1dL�Z2dM�Z3dN�Z4dO�Z5dPdQ�Z6dR�Z7RS(Ts�
    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_eventR>R=tclose_eventcC s�|j|�||_tj|j�|_tj�|_d|_
d|_d\|_|_
|jd|j�|_|jd|j�|_d|_tr�|jd|j�ndS(NRQRSRT(NN(t
set_canvasR1R�tCallbackRegistryteventsR�twidgetstLockDrawt
widgetlockRt_buttont_keyt_lastxt_lastytmpl_connecttpicktbutton_pick_idtscroll_pick_idR0R,tonHilite(RR1((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRWs
				cC s�d�}||jj|��}d}|r:|d}nxf|r�dG|GH|j�rf|j�Pnd}x*|D]"}||j�krs|}PqsqsW|}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*R4(tartistsR�tLR*((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytsort_artistsss"
i����tRemovingN(R1thitlistRRt	draw_idletget_children(RtevRktunderR�tparenttp((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytonRemoveks 	
		

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(
thasattrtdictRuR1Rmt	set_colort
set_edgecolort
set_facecolorRvRwt
get_facecolorRRn(RRpRqR:tentertleave((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRh�s4((

"

cC s&|jj�s"|jj|�ndS(N(R_tlockedR1Re(RRG((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRe�scC sdS(sA
        blit the canvas in bbox (default entire canvas)
        N((Rtbbox((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytblit�scC sdS(s/
        set the canvas size in pixels
        N((RR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytresize�scC s/d}t|||�}|jj||�dS(sx
        This method will be call all functions connected to the
        'draw_event' with a :class:`DrawEvent`
        RNN(R%R�R@(RR�R tevent((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRN�scC s,d}t||�}|jj||�dS(s|
        This method will be call all functions connected to the
        'resize_event' with a :class:`ResizeEvent`
        RMN(R&R�R@(RR R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRM�scC sJd}y,t||d|�}|jj||�Wntk
rEnXdS(s
        This method will be called by all functions connected to the
        'close_event' with a :class:`CloseEvent`
        RYR#N(R'R�R@t	TypeError(RR#R R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRY�s
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`
        ROR#N(RaRKRbRcR�R@(RRDR#R R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRO�s	$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`
        RPR#N(RKRbRcR�R@RRa(RRDR#R R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRP�s$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
        RUN(RFR�R@(RRGRHRR R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRU�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.
        ituptdownRSRER#N(R`RBRaR�R@(RR5R6RER#R RG((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRSs		c	C sJ||_d}t||||||jd|�}|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.

        RQR#N(R`RBRaR�R@(RR5R6RCR#R RG((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRQs
	$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.

        RRR#N(RBRaR�R@RR`(RR5R6RCR#R R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRR*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.

        RTR#N(RbRcRBR`RaR�R@(RR5R6R#R R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRTBs
	cC s#|jjdtj�dt_dS(s�
        Backend derived classes should call this function when leaving
        canvas

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

        RXN(R�R@R(R?R(RR#((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytleave_notify_event[s	cC s)td||�}|jjd|�dS(s�
        Backend derived classes should call this function when entering
        canvas

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

        RWN(R R�R@(RR#R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytenter_notify_eventgs	cC s2d}t||d|�}|jj||�dS(scall when GUI is idleRVR#N(R$R�R@(RR#R R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRVsscC 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(R0RtRuntimeError(Rtax((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
grab_mouseyscC 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(R0R(RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
release_mouse�scO sdS(s?
        Render the :class:`~matplotlib.figure.Figure`
        N((RRR((sK/opt/alt/python27/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�(RRR((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRn�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�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdraw_cursor�scC s(t|jjj�t|jjj�fS(s�
        return the figure width and height in points or pixels
        (depending on the backend), truncated to integers
        (RR1R�R�R�(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��ssEnhanced MetafiletemfsEncapsulated PostscripttepssPortable Document FormattpdfsPortable Network Graphicstpngt
PostscripttpssRaw RGBA bitmaptrawtrgbasScalable Vector GraphicstsvgtsvgzcO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasEMF(tbackends.backend_emfR�tswitch_backendst	print_emf(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasPS(tbackends.backend_psR�R�t	print_eps(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasPdf(tbackends.backend_pdfR�R�t	print_pdf(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasAgg(tbackends.backend_aggR�R�t	print_png(RRRR�tagg((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(R�(R�R�R�tprint_ps(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(R�(R�R�R�t	print_raw(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(tFigureCanvasSVG(tbackends.backend_svgR�R�t	print_svg(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scO s/ddlm}|j|�}|j||�S(Ni����(R�(R�R�R�t
print_svgz(RRRR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scC s|jS(N(t	filetypes(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_supported_filetypes�scC sQi}xD|jj�D]3\}}|j|g�j|�||j�qW|S(N(R�titemst
setdefaultR9R4(Rt	groupingstextR!((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytget_supported_filetypes_grouped�s
c s�d|�|tkr9t|����fd�}|S|�jksXt���r��jj�}|j�td|dj|�f��nt���S(Nsprint_%sc s+�j��}t|��}|||�S(N(R�tgetattr(RRtbackendtprint_method(R
tmethod_nameR(sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
_print_method�ss4Format "%s" is not supported.
Supported formats: %s.s, (RR�RztkeysR4R�tjoinR�(RR	R�tformats((R
R�RsK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt_get_print_method�s


R�tportraitcK s|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�}|r�|dkr_|tj�d|d|d	|d
|dt|�}
|jj}|jj|�}g|jdg�D]}|j|�^q�}|r;tjg|D]*}|jd
ks�|jd
kr�|^q��}t|t�jd|jj��}tj||g�}n|jdd�}|j|�}nt j!|j||�}||f}nd}z1||d|d|d	|d
|d||�}
Wd|r�|r�|�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.

        *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.

        itt.ssavefig.dpitbbox_inchesttightR�t	facecolort	edgecolortorientationtdryruntbbox_extra_artistsig�?t
pad_inchesg�������?tbbox_inches_restoreN(#RR�tis_string_liketosR&tsplitexttget_default_filetypetrstriptlowerR�RR1R�RRwR~R}Rt	cStringIOtStringIOR�t_cachedRenderert
get_tightbboxtget_window_extentRtunionR�R�RRR�tpaddedt
tight_bboxtadjust_bboxRZ(RtfilenameR�R�R�R�R	RR�torigDPIt
origfacecolort
origedgecolorR�tresultR�R:tbbR�t_bboxtbbox_inches1tpadtrestore_bboxt_bbox_inches_restore((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytprint_figuresv. 
	+@	

cC s
t�dS(N(R$(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scC 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(RzRtset_window_title(Rttitle((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��scC 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
        (R1(RtFigureCanvasClasst	newCanvas((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��s	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)

        (R�tconnect(RR R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRd�s-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)
        (R�t
disconnect(Rtcid((sK/opt/alt/python27/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�(RRR((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_event_loopsicC 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(
twarningstwarntDeprecationWarningRPtinfR�t_loopingR�ttimetsleep(RR�tstrttimesteptcounter((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstart_event_loop_defaults
	

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(R,R�(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytstop_event_loop_default3s
N(8RRRR\RRtRhReRR�R�RNRMRYRORPRURSRQRRRTR�R�RVR�R�R�RnR�R�R�R�R�R�R�R�R�t	print_bmpt	print_rgbR�R�R�R�R�R�R�R�R�RdR�R�R�R�R�R�R�(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRL:s�				"	+			
	


									
						
						�				/					
"tFigureManagerBasecB sMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(s�
    Helper class for pyplot mode, wraps everything up into a neat bundle

    Public attibutes:

    *canvas*
        A :class:`FigureCanvasBase` instance

    *num*
        The figure nuamber
    cC s5||_||_||_|jjd|j�dS(NRO(R"RtnumRdt	key_press(RR"R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRMs			cC sdS(N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdestroyTscC sdS(N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytfull_screen_toggleWscC sdS(s)For gui backends: resize window in pixelsN((RR�R�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�ZscC s�|jdkrdStd}td}td}td}td}td}td}td}	td	}
td
}td}|j|kr�|j�n�|j|kr�|jjj�n�|j|kr�|jjj�n�|j|kr|jjj�nf|j|kr%|jjj	�nD|j|krG|jjj
�n"|j|kri|jjj�n|jdkr|dS|j|	kr�|jj
�|jj�n�|j|
kr'|j}
|
j�}|dkr�|
jd
�|
jjj�q�|d
kr�|
jd�|
jjj�q�n_|j|kr�|j}
|
j�}|dkrw|
jd
�|
jjj�q�|d
kr�|
jd�|
jjj�q�n�|jj�r�|jdks�|j|kr�|j|kr�t|j�d}nx�t|jjj��D]n\}}|jdk	r|jdk	r|j|�r|j|kri|jt�q|j||k�qqWndS(Nskeymap.fullscreenskeymap.homeskeymap.backskeymap.forwards
keymap.panskeymap.zoomskeymap.saveskeymap.grids
keymap.yscales
keymap.xscaleskeymap.all_axestlogtlineart0i(RDRRRR"ttoolbarthometbacktforwardtpantzoomtsave_figureR.tgridR�t
get_yscalet
set_yscaleR1t
get_xscalet
set_xscaletisdigitRt	enumerateR2R5R6R3tset_navigateR�(RR�tfullscreen_keyst	home_keyst	back_keystforward_keystpan_keyst	zoom_keyst	save_keyst	grid_keysttoggle_yscale_keysttoggle_xscale_keystallR�R�tscalextnRjR:((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR^sv












	

	

-%cC sdS(s8
        Display message in a popup -- GUI only
        N((Rtmsg((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
show_popup�scC sdS(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).
        N((RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR��s(
RRRRRRR�RR'R�(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRAs					]	tCursorscB s eZed�\ZZZZRS(i(RRtrangetHANDtPOINTERt
SELECT_REGIONtMOVE(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR(�stNavigationToolbar2cB s
eZdZd�Zd�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�Zd�Zd�Zd�Zd�ZRS(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!
    cC s�||_||_tj�|_tj�|_d|_d|_d|_	d|_
d|_|j�|jj
d|j�|_g|_d|_d|_d|_|j�dS(NRTR�(R"R
R�tStackt_viewst
_positionsRt_xypresst_idPresst
_idReleaseRut_lastCursort
_init_toolbarRdt
mouse_movet_idDragt	_ids_zoomt
_zoom_modet_button_pressedtmodetset_history_buttons(RR"((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�s 							
				cC sdS(s-display a message on toolbar or in status barN((RR ((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytset_message	scG s2|jj�|jj�|j�|j�dS(smove back up the view lim stackN(R0RR1R=t_update_view(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR	s


cC sdS(N((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytdynamic_update	scC sdS(s3draw a rectangle rubberband to indicate zoom limitsN((RR�tx0ty0tx1ty1((sK/opt/alt/python27/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(R0R
R1R=R?(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR
#	s


cG s2|jj�|jj�|j�|j�dS(srestore the original viewN(R0RR1R=R?(RR((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR*	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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR61	scC sv|js|jrH|jtjkr�|jtj�tj|_q�n�|jdkr�|jtjkr�|jtj�tj|_q�n@|jdkr�|jtjkr�|jtj�tj|_n|jrb|jj�rby|jj	|j
|j�}Wn!tk
rqrt
k
r%qrXt|j�rR|jd|j|f�qr|j|�n|j|j�dS(NtZOOMtPANs%s, %s(R.RuR5tcursorsR+t
set_cursorR,R-tget_navigatetformat_coordR8R9R�t
OverflowErrorR-R<R>(RR�R ((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR7G	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 rightRGR�RQRRspan/zoomN(RuRR3R"R�R<R4Rdt	press_pantrelease_panR_treleaseR1R2tset_navigate_modeR>(RRR:((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRe	s(					cC sdS(s5this will be called whenver a mouse button is pressedN((RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytpress�	scC sE|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|||j�|jj||f�|j
j|j�|j
jd|j�|_q�q�W|j|�dS(s0the press mouse button in pan/zoom mode callbackiiNRT(RCR;RR5R6R0temptytpush_currentR2RR"R1R2R3RJt	start_panR9R�R8Rdtdrag_panRQ(RR�R5R6RjR:((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRM�	s"	
	%3"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 callbackiiNRTRORP(RCR;RR5R6R0RRRSR2RR"R1R2R3RJtcan_zoomR9tviewLimR]R5Rdt	drag_zoomt_switch_on_zoom_modet_switch_off_zoom_modeR9RDR:RQ(	RR�R5R6RjR:tid1tid2tid3((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt
press_zoom�	s,	
	%';cC s|j|_|j|�dS(N(RDR:R7(RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRY�	scC sd|_|j|�dS(N(RR:R7(RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRZ�	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(
R"R1R2tget_xlimtget_ylimR9tget_positionR�R]R0tpushR1R=(RtlimstposR:txmintxmaxtymintymax((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRS�	scC sdS(s5this will be called whenever mouse button is releasedN((RR�((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRO�	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 modeNRT(R;RR"R�R8RdR7R2tend_panRSROR�(RR�R:tind((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRN�	s			

cC sJx9|jD].\}}|j|j|j|j|j�q
W|j�dS(s"the drag callback in pan/zoom modeN(R2RUR;RDR5R6R@(RR�R:Rj((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRU�	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 modeiR5R6N(	R2R5R6R�textentsRdtminR:RE(RR�R5R6tlastxtlastyR:RjtlimR2RCRDtx2ty2((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRX�	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 modeNiiR5R6iR( R9R"R�R2R5R6tabsRROR�RkR5R6R7R_R`R,tget_shared_x_axestjoinedR�tget_shared_y_axesR9R;R:tset_xlimtset_ylimRRPRtpowRRS(RR�tzoom_idtlast_atcur_xypressR5R6RmRnR:RjRoR2RARBRCRDtinversetXmintXmaxtYmintYmaxttwinxttwinytlaR�trx1trx2try1try2((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pytrelease_zoom
s�		,	



	

	
		
	
		$$
			
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(
R"R1R2R�RR9tget_major_locatortget_minor_locatortrefreshR�(RR:R�R�tlocatorstloc((sK/opt/alt/python27/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(R0RR1RR"R1R2RvRwtset_positionR�(	RRcRdRjR:ReRfRgRh((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR?�
s%cG s
t�dS(ssave the current figureN(R$(RR((sK/opt/alt/python27/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((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRI�
scC s(|jj�|jj�|j�dS(sreset the axes stackN(R0tclearR1R=(R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyRJ�
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 modeRFR�RQRRs	zoom rectN(RuRR3R"R�R<R4RdR^R�R_ROR1R2RPR>(RRR:((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR�
s$			cC sdS(s%enable or disable back/forward buttonN((R((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR=�
s(RRRRR>RR@RER
RR6R7RRQRMR^RYRZRSRORNRURXR�R�R?RRIRJRR=(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyR.�s:*										 			#									l						(4Rt
__future__RR�R�R�tnumpyRPtmatplotlib.cbookR�tmatplotlib.colorsR[tmatplotlib.transformsR.tmatplotlib.widgetsR]t
matplotlibRRtmatplotlib._pylab_helpersRRRRR�tmatplotlib.tight_bboxR�tmatplotlib.textpathRtmatplotlib.pathRRRtobjectRRR�R�R R$R%R&R'R(RBRFRKRLRR(RHR.(((sK/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backend_bases.pyt<module>sR$	����	m-(���
�