?PNG  IHDR ? f ??C1 sRGB ?? gAMA ? a pHYs ? ??od GIDATx^LeY?a?("Bh?_????q5k?*:t0A-o??]VkJM??f?8\k2ll1]q????T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
Jc@ sdZddklZddkZddkZddkZddkZddki Z ddk i Z ddk i Z ddkiZddkiZddklZddk lZlZlZddkZddkiZdfdYZdfd YZd fd YZd efd YZdefdYZdefdYZdefdYZ de fdYZ!defdYZ"de fdYZ#dfdYZ$dfdYZ%dfdYZ&e&Z'd fd!YZ(dS("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. i(tdivisionN(trcParams(tBboxtTransformedBboxtAffine2Dt RendererBasecB seZdZdZddZdZddZddZdZ dZ dZ d Z d Z ddd Zd Zd dZedZdZdZdZdZdZdZdZdZdZRS(sAn 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 s d|_dS(N(tNonet _texmanager(tself((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt__init__:scC 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.6/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.6/site-packages/matplotlib/backend_bases.pyt close_groupEscC s tdS(sk Draws a :class:`~matplotlib.path.Path` instance using the given affine transform. N(tNotImplementedError(Rtgctpatht transformtrgbFace((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt draw_pathLsc C swxp|i|dtD]Y\}}t|o@|d\} } |i|||tii| | |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. tsimplifyiN(t iter_segmentstFalsetlenRt transformsRt translate( RRt marker_patht marker_transRttransRtverticestcodestxty((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt draw_markersSs   cC sg}x6|i|||D]\}}|i||fqWx|i||||||| | | | | | D]X\}}}}}|\}}ti|ii||}|i||||qpWdS(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 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_collectionRRt get_matrixRR(Rtmaster_transformtcliprecttclippathtclippath_transtpathstall_transformstoffsetst offsetTranst facecolorst edgecolorst linewidthst linestylest antialiasedsturlstpath_idsRRtxotyotpath_idRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdraw_path_collectionos      !c C sddkl} | i|||}| o@tiddddggti}tidgti}n| }tidgti}|i|||||g|| | ||g| gdgS(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.collectionsR9tconvert_mesh_to_pathstnptarraytfloat_R8R(RR&R'R(R)t meshWidtht meshHeightt coordinatesR,R-R.t antialiasedt showedgesR9R*R/R0((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdraw_quad_meshs $ c c st|}t|}t||}|djodSti}xJt|D]<}|||} |o|||}n| ||fVqRWdS(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(RtmaxRtIdentityTransformtxrange( RR&R*R+tNpathst NtransformstNRtiR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR"s     c c st|} t|}t| |}t|}t|}t| }t| }t| }t| }|djo |djp | djodS|o|i|}n|i}|i||dj o#ti||}|i|n|djo d}n|djo|i dnd\}}xBt |D]4}||| }|o|||\}}n|o|||}n|oY|i ||||o|i | ||n|o|i | ||qn|dj o2t|djo|i |d|d }n|i| |||o|i| ||n|||||fVqLW|idS(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. iNgiii(ii(RRERtnew_gctset_clip_rectangleRRtTransformedPatht set_clip_patht set_linewidthRGtset_foregroundt set_dashest set_alphatset_antialiasedtset_urltrestore(RR4R'R(R)R,R-R.R/R0R1R2R3RHtNoffsetsRJt Nfacecolorst Nedgecolorst Nlinewidthst NlinestylestNaatNurlsttoffsetsRRR5R6RKR7((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR$sX        '         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.6/site-packages/matplotlib/backend_bases.pytget_image_magnificationscC s tdS(s  Draw the image instance into the current axes; *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 *bbox* a :class:`matplotlib.transforms.Bbox` instance for clipping, or None N(R(RRR timtbboxR(R)((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt draw_image"scC stS(s overwrite this method for renderers that do not necessarily want to rescale and composite raster images. (like SVG) (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytoption_image_nocomposite8ssTeX!cC s tdS(N(R(RRRR R tproptangletismath((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdraw_tex?scC s tdS(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(RRRR R RdReRf((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt draw_textBs!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 (tTrue(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytflipyescC sdS(s4return the canvas width and height in display coordsi(ii((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_canvas_width_heightmscC s7|idjo ddkl}||_n|iS(sO return the :class:`matplotlib.texmanager.TexManager` instance i(t TexManagerN(RRtmatplotlib.texmanagerRl(RRl((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_texmanagerqscC s tdS(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 N(R(RR RdRf((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_text_width_height_descentzscC stS(sF Return an instance of a :class:`GraphicsContextBase` (tGraphicsContextBase(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRLscC 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 ((Rtpoints((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytpoints_to_pixelsscC s ti|S(N(tcbookt strip_math(RR ((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRtscC sdS(N((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytstart_rasterizingscC sdS(N((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytstop_rasterizingsN(t__name__t __module__t__doc__R RR R RR!R8RDR"R$R_RbRcRgRRhRjRkRnRoRLRrRtRuRv(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR)s0      %   O    #       RpcB s_eZdZhd*d6dd+fd6dd,fd6dd-fd 6Zd Zd Zd Zd ZdZ dZ dZ dZ dZ dZdZdZdZdZdZdZdZdZdZdZdZedZd 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?itbutttroundRzg(NN(ggg(t_alphat _antialiasedt _capstyleRt _cliprectt _clippatht_dashest _joinstylet _linestylet _linewidtht_rgbt_hatcht_urlt_snap(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s            cC s|i|_|i|_|i|_|i|_|i|_|i|_|i|_|i|_|i|_|i |_ |i |_ |i |_ |i |_ dS(sCopy properties from gc to selfN( RRRRRRRRRRRRR(RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytcopy_propertiess            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.6/site-packages/matplotlib/backend_bases.pyRVscC s|iS(sb Return the alpha value used for blending - not supported on all backends (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_alphascC s|iS(s@Return true if the object should try to do antialiased rendering(R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_antialiasedscC s|iS(sT Return the capstyle as a string in ('butt', 'round', 'projecting') (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_capstylescC s|iS(s^ Return the clip rectangle as a :class:`~matplotlib.transforms.Bbox` instance (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_clip_rectanglescC s"|idj o|iiSdS(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(RRtget_transformed_path_and_affine(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_clip_pathscC s|iS(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 `_ for more info. Default value is None (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_dashess cC s|iS(sR Return the line join style as one of ('miter', 'round', 'bevel') (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_joinstylescC s|iS(s` Return the linestyle: one of ('solid', 'dashed', 'dashdot', 'dotted'). (R(Rtstyle((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_linestyle scC s|iS(s= Return the line width in points as a scalar (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_linewidthscC s|iS(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((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_rgbscC s|iS(s= returns a url if one is set, None otherwise (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_url scC s|iS(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.6/site-packages/matplotlib/backend_bases.pytget_snap&s cC s ||_dS(s_ Set the alpha value used for blending - not supported on all backends N(R(Rtalpha((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRS3scC s!|o d|_n d|_dS(sK True if object should be drawn with antialiased rendering iiN(R(Rtb((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRT:s cC s.|djo ||_ntd|dS(sQ Set the capstyle as a string in ('butt', 'round', 'projecting') R~Rt projectings!Unrecognized cap style. Found %sN(sbuttsroundR(Rt ValueError(Rtcs((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt set_capstyleCs  cC s ||_dS(sT Set the clip rectangle with sequence (left, bottom, width, height) N(R(Rt rectangle((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRMLscC 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.6/site-packages/matplotlib/backend_bases.pyRORscC 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(Rt dash_offsett dash_list((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRRZs cC s-|o ||_ntii||_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(RtcolorstcolorConvertertto_rgba(RtfgtisRGB((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRQgs  cC s|||f|_dS(sI Set the foreground color to be a gray level with *frac* N(R(Rtfrac((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt set_graylevelvscC s.|djo ||_ntd|dS(sM Set the join style to be one of ('miter', 'round', 'bevel') tmiterRtbevels"Unrecognized join style. Found %sN(RsroundR(RR(Rtjs((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt set_joinstyle|s  cC s ||_dS(s- Set the linewidth in points N(R(Rtw((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRPscC sNy|i|\}}Wntd|nX||_|i||dS(sb Set the linestyle to be one of ('solid', 'dashed', 'dashdot', 'dotted'). sUnrecognized linestyle: %sN(tdashdRRRR(RRtoffsettdashes((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt set_linestyles  cC s ||_dS(s? Sets the url for links in compatible backends N(R(Rturl((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRUscC 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.6/site-packages/matplotlib/backend_bases.pytset_snaps cC s ||_dS(s2 Sets the hatch style for filling N(R(Rthatch((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt set_hatchscC s|iS(s. Gets the current hatch style (R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt get_hatchscC s+|idjodStii|i|S(s7 Returns a Path for the current hatch. N(RRRtPathR(Rtdensity((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_hatch_pathsN(NN(g@g@(g@g@g?g@(g?g@(%RwRxRyRRR RRVRRRRRRRRRRRRRSRTRRMRORRRRQRRRPRRURRRR(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRpsJ                        tEventcB seZdZddZRS(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(RRRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s  N(RwRxRyRR (((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRst IdleEventcB seZdZRS(sc An event triggered by the GUI backend when it is idle -- useful for passive animation (RwRxRy(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRst DrawEventcB seZdZdZRS(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 ti|||||_dS(N(RR trenderer(RRRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s(RwRxRyR (((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs t ResizeEventcB seZdZdZRS(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/ti||||i\|_|_dS(N(RR tget_width_heighttwidththeight(RRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s(RwRxRyR (((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs t LocationEventcB sGeZdZdZdZdZdZdZdZ ddZ dZ RS(s A 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 sti|||d|||_||_|djp |djod|_|idSg}|iii D]!}|i |o ||qtqt~}t |djod|_|idSt |djo'd} |i | |d|_n|d|_y+|ii ii||f\} } Wn%tj od|_d|_nX| |_| |_|idS(s? *x*, *y* in figure coords, 0,0 = bottom, left RNiicS st|i|iS((tcmptzorder(t_xt_y((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt4si(RR RR Rtinaxest_update_enter_leaveRtfiguretget_axestin_axesRtsortt transDatatinvertedttransform_pointRtxdatatydata( RRRRR Rt_[1]tat axes_listtaxCmpRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s2    A     +   cC stidj oxti}|i|ijoX|idj o|iiid|n|idj o|iiid|qqn+|idj o|iiid|n|t_dS(s*process the figure/axes enter leave eventstaxes_leave_eventtaxes_enter_eventN(Rt lasteventRRRt callbackstprocess(Rtlast((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyREs "N( RwRxRyRRR RRRRR R(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs )t MouseEventcB sMeZdZdZdZdZdZdZdZ dZ dddddZ RS(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>ti|||||d|||_||_||_dS(sn x, y in figure coords, 0,0 = bottom, left button pressed None, 1, 2, 3, 'up', 'down' RN(RR tbuttontkeytstep( RRRRR RRRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR }s  N( RwRxRyRRR RRRRRR (((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR[st PickEventcB seZdZddZRS(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<ti||||||_||_|ii|dS(N(RR t mouseeventtartistt__dict__tupdate(RRRRRRtkwargs((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s  N(RwRxRyRR (((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs tKeyEventcB s eZdZddddZRS(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,ti|||||d|||_dS(NR(RR R(RRRRRR R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR sN(RwRxRyRR (((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRstFigureCanvasBasecB s@eZdZddddddddd d d d d dgZdZdZdZdZdMdZ dZ dZ dZ dMdZ dMdZdZdMdZdMdZdMdZdMdZdMdZdMdZdMd Zd!Zd"Zd#Zd$Zh d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d/d16d2d36d2d46Zd5Zd6Zd7Zd8Zd9Z d:Z!e!Z"Z#d;Z$d<Z%d=Z&d>Z'dMd?d?d@dMdAZ(dBZ)dCZ*dDZ+dEZ,dFZ-dGZ.dHZ/dIZ0dJdKZ1dLZ2RS(Ns 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_eventRRcC s|i|||_ti|i|_ti|_d|_ d|_ d\|_ |_ |id|i|_|id|i|_to|id|indS(NRRR(NN(t set_canvasRRstCallbackRegistryteventsRtwidgetstLockDrawt widgetlockRt_buttont_keyt_lastxt_lastyt mpl_connecttpicktbutton_pick_idtscroll_pick_idRtonHilite(RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s    cC sd}||ii|}d}|o|d}nxl|oddG|GH|io|iPnd}x,|D]$}||ijo |}PqxqxW|}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 sYg}|D]}||i|fq ~}|ig}|D]\}}||q?~S(N(RR(tartistsRthtLt_[2]R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt sort_artistss* itRemovingN(RthitlistRtremovet draw_idlet get_children(RtevRtunderR tparenttp((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytonRemoves$     c C st|dpt|_n|ii|}g}|D]!}||ijo ||q=q=~}g}|iD]}||jo ||ququ~}x|D]|}t|do|i|i|nEt|do4|i|i|d|i|i|dn|i|=qWxu|D]m}t|do|i|i|/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR  s:55# cC s(|iip|ii|ndS(N(RtlockedRR(RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRKscC sdS(sA blit the canvas in bbox (default entire canvas) N((RRa((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytblitOscC sdS(s/ set the canvas size in pixels N((RRR ((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytresizeUscC s/d}t|||}|ii||dS(sx This method will be call all functions connected to the 'draw_event' with a :class:`DrawEvent` RN(RRR(RRR tevent((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR[scC s,d}t||}|ii||dS(s| This method will be call all functions connected to the 'resize_event' with a :class:`ResizeEvent` RN(RRR(RR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRescC sJ||_d}t||||i|id|}|ii||dS(s| This method will be call all functions connected to the 'key_press_event' with a :class:`KeyEvent` RRN(RRRRRR(RRRR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRos $cC sJd}t||||i|id|}|ii||d|_dS(s~ This method will be call all functions connected to the 'key_release_event' with a :class:`KeyEvent` RRN(RRRRRRR(RRRR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRys$cK s5d}t|||||}|ii||dS(s This method will be called by artists who are picked and will fire off :class:`PickEvent` callbacks registered listeners RN(RRR(RRRRR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRsc C sm|djo d|_n d|_d}t|||||i|id|d|}|ii||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. ituptdownRRRN(RRRRR(RRR RRR R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs   c C sJ||_d}t||||||id|}|ii||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. RRN(RRRRR(RRR RRR R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs $c C sJd}t||||||id|}|ii||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. RRN(RRRRRR(RRR RRR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs$c C sW|||_|_d}t|||||i|id|}|ii||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. RRN(RRRRRRR(RRR RR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs  cC s#|iidtidt_dS(s Backend derived classes should call this function when leaving canvas *guiEvent* the native UI event that generated the mpl event RN(RRRRR(RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytleave_notify_events cC s)td||}|iid|dS(s Backend derived classes should call this function when entering canvas *guiEvent* the native UI event that generated the mpl event RN(RRR(RRR*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytenter_notify_events cC s2d}t||d|}|ii||dS(scall when GUI is idleRRN(RRR(RRR R*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRscO sdS(s? Render the :class:`~matplotlib.figure.Figure` N((RtargsR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdrawscO s|i||dS(sX :meth:`draw` only if idle; defaults to draw but backends can overrride N(R0(RR/R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRscC 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.6/site-packages/matplotlib/backend_bases.pyt draw_cursor scC s(t|iiit|iiifS(s return the figure width and height in points or pixels (depending on the backend), truncated to integers (tintRRaRR(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRssEnhanced MetafiletemfsEncapsulated PostscripttepssPortable Document FormattpdfsPortable Network Graphicstpngt PostscripttpssRaw RGBA bitmaptrawtrgbasScalable Vector GraphicstsvgtsvgzcO s/ddkl}|i|}|i||S(Ni(tFigureCanvasEMF(tbackends.backend_emfR=tswitch_backendst print_emf(RR/RR=R3((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR@)scO s/ddkl}|i|}|i||S(Ni(tFigureCanvasPS(tbackends.backend_psRAR?t print_eps(RR/RRAR8((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRC.scO s/ddkl}|i|}|i||S(Ni(tFigureCanvasPdf(tbackends.backend_pdfRDR?t print_pdf(RR/RRDR5((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRF3scO s/ddkl}|i|}|i||S(Ni(tFigureCanvasAgg(tbackends.backend_aggRGR?t print_png(RR/RRGtagg((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRI8scO s/ddkl}|i|}|i||S(Ni(RA(RBRAR?tprint_ps(RR/RRAR8((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRK=scO s/ddkl}|i|}|i||S(Ni(RG(RHRGR?t print_raw(RR/RRGRJ((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRLBscO s/ddkl}|i|}|i||S(Ni(tFigureCanvasSVG(tbackends.backend_svgRMR?t print_svg(RR/RRMR;((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyROHscO s/ddkl}|i|}|i||S(Ni(RM(RNRMR?t print_svgz(RR/RRMR;((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRPMscC s|iS(N(t filetypes(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_supported_filetypesRscC sQh}xD|iiD]3\}}|i|gi|||iqW|S(N(RQtitemst setdefaultR#R(Rt groupingstextR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytget_supported_filetypes_groupedUs  RtportraitcK s|djoti|otii|dd}n|djp |djo;|i}ti|o|idd|}qqn|i}d|}||i jpt || o<|i i } | i t d|di| fn|djotd}n|ii} |ii} |ii} ||i_|ii||ii||idd} | o| d jot||tid |d |d |d |dt|}|ii}|ii|} |idd}| i|} nti|i|| }| |f}nd}z:t|||d |d |d |d |d||}Wd| o|o |n| |i_|ii| |ii| |ii |X|S(s7 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 itt.sprint_%ss4Format "%s" is not supported. Supported formats: %s.s, s savefig.dpit bbox_inchesttighttdpit facecolort edgecolort orientationtdryrunt pad_inchesg?tbbox_inches_restoreN(!RRstis_string_liketosRtsplitexttget_default_filetypetrstriptlowerRQRtkeysRRtjoinRRR]R$RR#R"tpoptgetattrt cStringIOtStringIORit_cachedRenderert get_tightbboxtpaddedt tight_bboxt adjust_bboxR(RtfilenameR]R^R_R`tformatRt method_nametformatstorigDPIt origfacecolort origedgecolorR[tresultRtpadt restore_bboxt_bbox_inches_restore((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt print_figure\sv  #               cC s tdS(N(R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRgscC s(t|do|ii|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). tmanagerN(RRtset_window_title(Rttitle((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRscC s||i}|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.6/site-packages/matplotlib/backend_bases.pyR?s cC s|ii||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' 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 tfunc((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs,cC s|ii|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.6/site-packages/matplotlib/backend_bases.pytmpl_disconnects cC s tdS(sg Flush the GUI events for the figure. Implemented only for backends with GUIs. N(R(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt flush_events$scC s tdS(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.6/site-packages/matplotlib/backend_bases.pytstart_event_loop+s cC s tdS(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.6/site-packages/matplotlib/backend_bases.pytstop_event_loop7sicC sd}|d7}ti|t|djo ti}nd}d}t|_xA|io6|||jo%|iti ||d7}qRWdS(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{Gz?iN( twarningstwarntDeprecationWarningR<tinfRit_loopingRttimetsleep(RRtstrttimesteptcounter((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytstart_event_loop_defaultAs     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.6/site-packages/matplotlib/backend_bases.pytstop_event_loop_defaultcs N(3RwRxRyRR RR RRR(R)RRRRRRRRRR-R.RR0RR1RRQR@RCRFRIRKRLt print_bmpt print_rgbRORPRRRWRRgRR?RRRRRRR(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs    " +                         v   .  "tFigureManagerBasecB sMeZdZdZdZdZdZdZdZdZ RS(s Helper class for matlab mode, wraps everything up into a neat bundle Public attibutes: *canvas* A :class:`FigureCanvasBase` instance *num* The figure nuamber cC s5||_||_||_|iid|idS(NR(RRtnumRt key_press(RRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR }s   cC sdS(N((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdestroyscC sdS(N((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytfull_screen_togglescC sdS(s)For gui backends: resize window in pixelsN((RRR ((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR)scC s|idjo|in2|idjp |idjp|idjo|iiin|idjp |idjp|idjo|iiin|idjp|id jo|iiinv|id jo|iiinR|id jo|iiin.|id jo|iii |iin|i djodS|id jo|i i |ii n|idjou|i }|i}|djo!|id|iii q|djo!|id|iii qn|idj o |iio|idjp|idjo|idjot|id}nxt|iiiD]t\}}|idj oX|idj oH|i|o8|idjo|itq |i||jqqWndS(NtfR trthometlefttct backspacetrighttvRtoR tgtltlogtlineart0Ri(RRRttoolbarRtbacktforwardtpantzoomt save_figureRRtgridR0t get_yscalet set_yscaleRtisdigitR2t enumerateRRR Rt set_navigateRi(RR*taxtscaletnRKR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRsJ00        @ 0cC sdS(s8 Display message in a popup -- GUI only N((Rtmsg((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt show_popupscC 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((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs( RwRxRyR RRR)RRR(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRqs      8 tCursorscB s eZed\ZZZZRS(i(RwRxtrangetHANDtPOINTERt SELECT_REGIONtMOVE(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRstNavigationToolbar2cB seZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZRS(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||_||_ti|_ti|_d|_d|_d|_ d|_ d|_ |i |ii d|i|_d|_d|_|idS(NRRY(RRRstStackt_viewst _positionsRt_xypresst_idPresst _idReleaseRt _lastCursort _init_toolbarRt mouse_movet_idDragt_button_pressedtmodetset_history_buttons(RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR s          cC sdS(s-display a message on toolbar or in status barN((RR ((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt set_messagescG s2|ii|ii|i|idS(smove back up the view lim stackN(RRRRt _update_view(RR/((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs   cC sdS(N((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdynamic_update#scC sdS(s3draw a rectangle rubberband to indicate zoom limitsN((RR*tx0ty0tx1ty1((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytdraw_rubberband&scG s2|ii|ii|i|idS(s"move forward in the view lim stackN(RRRRR(RR/((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR*s   cG s2|ii|ii|i|idS(srestore the original viewN(RRRRR(RR/((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR1s   cC s tdS(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.6/site-packages/matplotlib/backend_bases.pyR8sc C s|i p |i o7|itijo |ititi|_q0n|idjo|itijo |ititi|_n|ioO|i|i }}|id\}}}}}} |i |||||q0nD|idjo3|iti jo |iti ti |_n|io|ii oy|ii |i|i} Wn%tj oqtj oqXt|io|id|i| fq|i| n|i|idS(NtZOOMitPANs%s, %s(RRRtcursorsRt set_cursorRRRR RRt get_navigatet format_coordRRRt OverflowErrorRRR( RR*RR tlastxtlastyRtindtlimRR ((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRNs6 !cG sA|idjo d|_n d|_|idj o%|ii|i|_d|_n|idj o%|ii|i|_d|_n|ioS|iid|i|_|iid|i |_d|_|ii |n|ii i |x*|ii i D]}|i|iqW|i|idS(sAActivate the pan/zoom tool. pan with left button, zoom with rightRRYRRspan/zoomN(RRRRRRRRt press_pant release_panRtreleaseRRtset_navigate_modeR(RR/R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRps*        cC sdS(s5this will be called whenver a mouse button is pressedN((RR*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pytpressscC sP|idjo d|_n+|idjo d|_nd|_dS|i|i}}|iio|ing|_xt |i i i D]\}}|dj o|dj o{|i |ok|io^|i|||i|ii||f|i i|i|i id|i|_qqW|i|dS(s0the press mouse button in pan/zoom mode callbackiiNR(RRRRR Rtemptyt push_currentRRRRRRRt start_panR#RRRtdrag_panR(RR*RR RKR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs$     7#cC s7|idjo d|_n+|idjo d|_nd|_dS|i|i}}|iio|ing|_xt |i i i D]\}}|dj oo|dj ob|i |oR|ioE|io8|ii|||||ii|iifqqW|i|dS(s4the press mouse button in zoom to rect mode callbackiiN(RRRRR RRRRRRRRRRtcan_zoomR#tviewLimtfrozenRR(RR*RR RKR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt press_zooms      *<cC sg}g}x|iiiD]q}|i\}}|i\}}|i||||f|i|iti|iifqW|i i ||i i ||i dS(s8push the current view limits and position onto the stackN( RRRtget_xlimtget_ylimR#t get_positionRiRRtpushRR(RtlimstposRtxmintxmaxtymintymax((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRscC sdS(s5this will be called whenever mouse button is releasedN((RR*((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRscC s|idjodS|ii|i|iid|i|_x!|iD]\}}|iqMW|ipdSg|_d|_|i |i ||i dS(s2the release mouse button callback in pan/zoom modeNR( RRRRRRRRtend_panRRR0(RR*RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs      cC sJx9|iD].\}}|i|i|i|i|iq W|idS(s"the drag callback in pan/zoom modeN(RRRRRR R(RR*RR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs &cC s@|ipdSg}x|iD]}|i|i}}|\}}}} } } t||djpt||djo%d|_|i||idS| i\} } }}|ii }|i ||f\}}|i ||f\}}|i \}}|i \}}t t }}|o[xX|D]L}|ii||o t}n|ii||o t}q<q<Wn|i||o||} }n||jo]||jo||} }n||} }| |jo |} n||jo |}qxnZ||jo||} }n||} }| |jo |} n||jo |}n|o||} }n||jo]||jo||} }n||} }| |jo |} n||jo |}qSnZ||jo||} }n||} }| |jo |} n||jo |}n|idjo*|i| |f|i| |fq|idjoh|idjoVti||ti|| }t|| ||}t|| ||}n7|||| }||| |}||| |}|idjoVti||ti|| }t|| ||}t|| ||}n7|||| }||| |}||| |}|i||f|i||fqqW|id|_d|_|i|i|dS(s6the release mouse button callback in zoom to rect modeNiiiR(RRR tabsRRR0textentsRRRRRRtget_shared_x_axestjoinedRitget_shared_y_axesR#Rtset_xlimtset_ylimt get_xscaleR<RtpowRR(RR*tlast_at cur_xypressRR RRRRRRRRRRtinversetXmintXmaxtYmintYmaxttwinxttwinytlaRtrx1trx2try1try2((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyt release_zooms  .                        $$    cC sx|iiiD]}t|dd}t|dd}g}|dj o*|i|i|i|in|dj o*|i|i|i|inx|D]}|iqWqW|ii dS(s(redraw the canvases, update the locatorstxaxistyaxisN( RRRRmRR#tget_major_locatortget_minor_locatortrefreshR0(RRRRtlocatorstloc((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR0Ms  c C s|i}|djodS|i}|djodSxt|iiiD]x\}}||\}}}}|i||f|i||f|i ||dd|i ||ddqUW|i dS(s_update the viewlim and position from the view and position stack for each axes Nitoriginalitactive( RRRRRRRRRt set_positionR0( RRRRKRRRRR((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyR`s     cG s tdS(ssave the current figureN(R(RR/((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRtscC sdS(s\ Set the current cursor to one of the :class:`Cursors` enums values N((Rtcursor((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRxscC s(|ii|ii|idS(sreset the axes stackN(RtclearRR(R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs  cG sA|idjo d|_n d|_|idj o%|ii|i|_d|_n|idj o%|ii|i|_d|_n|ioS|iid|i|_|iid|i |_d|_|ii |n|ii i |x*|ii i D]}|i|iqW|i|idS(sactivate zoom to rect modeRRYRRs zoom rectN(RRRRRRRRRRRRRRRR(RR/R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs&      cC sdS(s%enable or disable back/forward buttonN((R((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs(RwRxRyR RRRRRRRRRRRRRRRRRR0RRRRRR(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyRs4*         "       \      ()Ryt __future__RReRRtnumpyR<tmatplotlib.cbookRstmatplotlib.colorsRtmatplotlib.transformsRtmatplotlib.widgetsRtmatplotlib.pathRt matplotlibRRRRRntmatplotlib.tight_bboxRsRRpRRRRRRRRRRRRR(((s>/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyts>$  {a-(c