?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@shdZddkZddklZddklZlZddkl Z ddk l Z dd!dYZ d d"d YZ d e fd YZd e fdYZde fdYZde fdYZde fdYZdd#dYZdd$dYZdd%dYZdefdYZdd&dYZde fd YZdS('s GUI Neutral widgets All of these widgets require you to predefine an Axes instance and pass that as the first arg. matplotlib doesn't try to be too smart in layout -- you have to figure out how wide and tall you want your Axes to be to accommodate your widget. iN(tdist(tCirclet Rectangle(tLine2D(tblended_transform_factorytLockDrawcBsDeZdZdZdZdZdZdZdZRS(sT some widgets, like the cursor, draw onto the canvas, and this is not desirable under all circumstaces, like when the toolbar is in zoom-to-rect mode and drawing a rectangle. The module level "lock" allows someone to grab the lock and prevent other widgets from drawing. Use matplotlib.widgets.lock(someobj) to pr cCs d|_dS(N(tNonet_owner(tself((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt__init__scCs-|i|ptdn||_dS(sreserve the lock for osalready lockedN(t availablet ValueErrorR(Rto((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt__call__scCs-|i|ptdnd|_dS(srelease the locksyou do not own this lockN(R R RR(RR ((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pytrelease"scCs|i p |i|S(sdrawing is available to o(tlockedtisowner(RR ((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR (scCs |i|jS(so owns the lock(R(RR ((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR,scCs |idj S(sthe lock is heldN(RR(R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR0s( t__name__t __module__t__doc__R R RR RR(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs     tWidgetcBseZdZeZeZRS(sT OK, I couldn't resist; abstract base class for mpl GUI neutral widgets (RRRtTruetdrawonteventson(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR6stButtoncBsDeZdZddddZdZdZdZdZRS( s> A GUI neutral button The following attributes are accesible ax - the Axes the button renders into label - a text.Text instance color - the color of the button when not hovering hovercolor - the color of the button when hovering Call "on_clicked" to connect to the button s0.85s0.95c Cs|d j o|i|n|idd|ddddd|i|_d|_h|_||_|ii i d|i |ii i d|i |i t|i||ig|ig||_||_||_d S( s ax is the Axes instance the button will be placed into label is a string which is the button text image if not None, is an image to place in the button -- can be any legal arg to imshow (numpy array, matplotlib Image instance, or PIL image) color is the color of the button when not activated hovercolor is the color of the button when the mouse is over it g?tverticalalignmenttcenterthorizontalalignmentt transformitbutton_press_eventtmotion_notify_eventN(Rtimshowttextt transAxestlabeltcntt observerstaxtfiguretcanvast mpl_connectt_clickt_motiont set_navigatetFalsetset_axis_bgcolort set_xtickst set_ytickstcolort hovercolort _lastcolor(RR%R"timageR0R1((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR Os$          cCsU|i|ijodS|ipdSx'|iiD]\}}||q7WdS(N(tinaxesR%RR$titems(Rteventtcidtfunc((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR)ws  cCs{|i|ijo |i}n |i}||ijo>|ii|||_|io|iiii qwndS(N( R4R%R1R0R2R-RR&R'tdraw(RR6tc((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR*}s    cCs)|i}||i|<|id7_|S(s When the button is clicked, call this func with event A connection id is returned which can be used to disconnect i(R#R$(RR8R7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt on_clickeds  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$tKeyError(RR7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt disconnectsN( RRRRR R)R*R;R=(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRAs '  tSlidercBsYeZdZddeed d edZdZdZdZdZ dZ RS( s+ A slider representing a floating point range The following attributes are defined ax : the slider axes.Axes instance val : the current slider value vline : a Line2D instance representing the initial value poly : A patch.Polygon instance which is the slider valfmt : the format string for formatting the slider text label : a text.Text instance, the slider label closedmin : whether the slider is closed on the minimum closedmax : whether the slider is closed on the maximum slidermin : another slider - if not None, this slider must be > slidermin slidermax : another slider - if not None, this slider must be < slidermax dragging : allow for mouse dragging on slider Call on_changed to connect to the slider event g?s%1.2fc Ks||_||_||_||_||_|i||dd| |_|i|dddddd|_||_ |i g|i ||f|i g|i t|iiid|i| o|iiid|in|idd |d |id d d d|_|idd ||d |id d d d|_d|_h|_||_||_| |_| |_dS(s Create a slider from valmin to valmax in axes ax; valinit - the slider initial position label - the slider label valfmt - used to format the slider value closedmin and closedmax - indicate whether the slider interval is closed slidermin and slidermax - be used to contrain the value of this slider to the values of other sliders. additional kwargs are passed on to self.poly which is the matplotlib.patches.Rectangle which draws the slider. See the matplotlib.patches.Rectangle documentation for legal property names (eg facecolor, edgecolor, alpha, ...) iiR0trtlwRRg{Gzg?RRRRtrightgRQ?tleftN(R%tvalmintvalmaxtvaltvalinittaxvspantpolytaxvlinetvlinetvalfmtR/tset_xlimR.R+R,R&R'R(t_updateR R!R"tvaltextR#R$t closedmint closedmaxt slidermint slidermax( RR%R"RCRDRFRKRORPRQRRtdraggingtkwargs((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s8     $            cCs|idjodS|i|ijodS|i}|i o||ijodS|i o||ijodS|idj o||ii jodSn|i dj o||i i jodSn|i |dS(supdate the slider positioniN( tbuttonR4R%txdataRORCRPRDRQRRERRtset_val(RR6RE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRMs    cCs|ii}|df|d<|df|d<||i_|ii|i||io|iiii n||_ |i pdSx'|i i D]\}}||qWdS(Niiii(RHtxyRNtset_textRKRR%R&R'R9RERR$R5(RRERXR7R8((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRWs      cCs)|i}||i|<|id7_|S(s When the slider valud is changed, call this func with the new slider position A connection id is returned which can be used to disconnect i(R#R$(RR8R7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt on_changeds  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$R<(RR7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR=scCs+|i|ijo|i|indS(s/reset the slider to the initial value if neededN(RERFRW(R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pytresetsN( RRRRRR RMRWRZR=R[(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR>s  9  t CheckButtonscBs2eZdZdZdZdZdZRS(s A GUI neutral radio button The following attributes are exposed ax - the Axes instance the buttons are in labels - a list of text.Text instances lines - a list of (line1, line2) tuples for the x's in the check boxes. These lines exist for each box, but have set_visible(False) when box is not checked rectangles - a list of patch.Rectangle instances Connect to the CheckButtons with the on_clicked method c Cs|ig|ig|itt|djo7dt|d}tid||t|}nd}dg}d}|i}g|_g|_ g|_ hdd6dd 6|i d 6d d 6}xvt ||D]e\} } |i d| | d |i d ddd} |d|d} } d| | d}} td|| fd| d| d|d |i }t||| g| | | g|}t||| g| | | g|}|i|||i|||ii| |i i||i i||f|i||i||i||d7}qW|iiid|i||_d|_h|_dS(s Add check buttons to axes.Axes instance ax labels is a len(buttons) list of labels as strings actives is a len(buttons) list of booleans indicating whether the button is active ig?g?g?itkR0g?t linewidthRtbutttsolid_capstyleRRBRRg@g?RXtwidththeightt facecolorRN(R.R/R+R,tlentnptlinspacetget_axis_bgcolortlabelstlinest rectanglesR!tzipR RRt set_visibletappendt add_patchtadd_lineR&R'R(t_clickedR%R#R$(RR%RhtactivestdytysR#taxcolort lineparamstyR"tttwthtxtptl1tl2((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR *sP   #         &&     c CsA|idjodS|i|ijodSxt|i|i|iD]\}}}|ii|i |i p|ii|i |i o?|\}}|i |i |i |i |}PqIqIWdS|i o|iiiin|ipdSx-|iiD]\}} | |iqWdS(Ni(RUR4R%RkRjRhRitget_window_extenttcontainsRzRvRlt get_visibleRR&R'R9RR$R5tget_text( RR6R{RwRiR|R}tthistR7R8((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRpjs*     cCs)|i}||i|<|id7_|S(s When the button is clicked, call this func with button label A connection id is returned which can be used to disconnect i(R#R$(RR8R7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR;s  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$R<(RR7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR=s(RRRR RpR;R=(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR\s  @  t RadioButtonscBs8eZdZdddZdZdZdZRS(sN A GUI neutral radio button The following attributes are exposed ax - the Axes instance the buttons are in activecolor - the color of the button when clicked labels - a list of text.Text instances circles - a list of patch.Circle instances Connect to the RadioButtons with the on_clicked method itbluec Cs||_|ig|ig|itdt|d}tid||t|}d}|i}g|_ g|_ xt ||D]\} } |i d| | d|i dddd } ||jo |} n|} td d | fd d d| d|i } |i i| |i i| |i| |d7}qW|iiid|i||_d|_h|_dS(s Add radio buttons to axes.Axes instance ax labels is a len(buttons) list of labels as strings active is the index into labels for the button that is active activecolor is the color of the button when clicked g?iig?RRRBRRRXg333333?tradiusg?RcRN(t activecolorR.R/R+R,RdReRfRgRhtcirclesRkR R!RRmRnR&R'R(RpR%R#R$(RR%RhtactiveRRrRsR#RtRvR"RwRcR{((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s8               c s|idjodS|i|ijodS|iiii|i|if}ti |d|dgfd}xdt |i |i D]I\}}|i i|i|ip ||o|}|}PqqWdSxG|i D]<}||jo |i}n|ii}|i|qW|io|iiiin|ipdSx-|iiD]\} } | |iqqWdS(Niics9ti|id|idg}t||ijS(Nii(RetarrayRRR(R{tpcirc(tpclicked(s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pytinsides#(RUR4R%R!tinvertedttransform_pointRzRvReRRkRRhR~RRRgt set_facecolorRR&R'R9RR$R5R( RR6RXRR{RwtinpRR0R7R8((Rs8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRps6' ,      cCs)|i}||i|<|id7_|S(s When the button is clicked, call this func with button label A connection id is returned which can be used to disconnect i(R#R$(RR8R7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR;s  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$R<(RR7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR=s(RRRR RpR;R=(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs  1  t SubplotToolcBsMeZdZdZdZdZdZdZdZdZ RS(s3 A tool to adjust to subplot params of fig cs\|_idddddddY}id_iidiittidd d |ii d t_ i i i id _ i itti d d d |iid t_ii iid_iittidd d |iidt_ii iid_iittidd d |iidt_ii iid_iittidd d |iid t_ii iid_iittidd d |iid t_ii i ii _!i i_"ii_!ii_"i#ddddg}t$|d_%i iiiiiffd}ii&}ti_&i%i'||i_&dS(s targetfig is the figure to adjust toolfig is the figure to embed the the subplot tool into. If None, a default pylab figure will be created. If you are using this from the GUI RBg?RAg?t toolbarfmtcBseZdZdZRS(cSs ||_dS(N(tslider(RR((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR scSs*d|iii|iif}||S(Ns%s=%s(RR"RRK(RRzRvtfmt((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s"(RRR R (((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs is'Click on slider to adjust subplot paramiiRPitbottomiROittopitwspaceithspaceg?g?g333333?g333333?tResetcsi}t_g}x'D]}|i|it|_qWxD]}|iqIWx&t|D]\}}||_qmW|_io!iiiiindS(N(RR,RmR[RkR'R9t targetfig(R6t thisdrawontbsRtb(tslidersRttoolfig(s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR8Hs"        N(((Rtsubplots_adjustt add_subplottaxleftt set_titleR+R,R>t subplotparsRBt sliderleftRZtfunclefttaxbottomRt sliderbottomt funcbottomtaxrightRAt sliderrightt funcrighttaxtopRt slidertoptfunctoptaxwspaceRt sliderwspacet funcwspacetaxhspaceRt sliderhspacet funchspaceRRRQtadd_axesRt buttonresettvalidateR;(RRRRtbaxR8R((RRRs8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR sR ******  cCs5|iid||io|iiindS(NRB(RRRR'R9(RRE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRjs cCs5|iid||io|iiindS(NRA(RRRR'R9(RRE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRns cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRrs cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRvs cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRzs cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR~s ( RRRR RRRRRR(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs f     tCursorcBs5eZdZedZdZdZdZRS(sr A horizontal and vertical line span the axes that and move with the pointer. You can turn off the hline or vline spectively with the attributes horizOn =True|False: controls visibility of the horizontal line vertOn =True|False: controls visibility of the horizontal line And the visibility of the cursor itself with visible attribute cKs||_|ii|_|iid|i|iid|it|_t|_t|_ ||_ |i |i ddt ||_|i|iddt ||_d|_t |_dS(s Add a cursor to ax. If useblit=True, use the backend dependent blitting features for faster updates (GTKAgg only now). lineprops is a dictionary of line properties. See examples/widgets/cursor.py. Rt draw_eventitvisibleN(R%R&R'R(tonmovetclearRRthorizOntvertOntuseblittaxhlinet get_yboundR,tlinehRIt get_xboundtlinevRt backgroundt needclear(RR%Rt lineprops((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s     %% cCsM|io|ii|ii|_n|iit|i itdS(sclear the cursorN( RR'tcopy_from_bboxR%tbboxRRRlR,R(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs cCs|i|ijoI|iit|iit|io|iit|_ndSt |_|i pdS|ii |i |i f|ii |i|if|ii|i o|i|ii|i o|i|idS(s*on mouse motion draw the cursor if visibleN(R4R%RRlR,RRR'R9RRt set_xdataRVt set_ydatatydataRRRM(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs     cCs|iog|idj o|ii|in|ii|i|ii|i|ii |ii n|ii t S(N( RRRR'trestore_regionR%t draw_artistRRtblitRt draw_idleR,(R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRMs  (RRRR,R RRRM(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs     t MultiCursorcBs5eZdZedZdZdZdZRS(s Provide a vertical line cursor shared between multiple axes from matplotlib.widgets import MultiCursor from pylab import figure, show, nx t = nx.arange(0.0, 2.0, 0.01) s1 = nx.sin(2*nx.pi*t) s2 = nx.sin(4*nx.pi*t) fig = figure() ax1 = fig.add_subplot(211) ax1.plot(t, s1) ax2 = fig.add_subplot(212, sharex=ax1) ax2.plot(t, s2) multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1) show() c Ks||_||_|di\}}d||}g}|D]} || i|dt|qA~|_t|_||_d|_ t|_ |ii d|i |ii d|idS(Nig?RRR(R'taxestget_xlimRIR,RiRRRRRRR(RR( RR'RRRtxmintxmaxtxmidt_[1]R%((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s  6    cCsQ|io"|ii|iii|_nx|iD]}|itq6WdS(sclear the cursorN( RR'RR&RRRiRlR,(RR6tline((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs  " cCs|idjodS|iii|pdSt|_|ipdSx:|iD]/}|i |i |i f|i |iqRW|i dS(N( R4RR't widgetlockR RRRRiRRVRlRM(RR6R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs   cCs|iow|idj o|ii|inx0t|i|iD]\}}|i|qGW|ii |ii i n|ii dS(N( RRRR'RRkRRiRRR&RR(RR%R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRM s  (RRRRR RRRM(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs    t SpanSelectorcBsbeZdZd ed d dZdZdZdZdZ dZ dZ dZ RS( sg Select a min/max range of the x or y axes for a matplotlib Axes Example usage: ax = subplot(111) ax.plot(x,y) def onselect(vmin, vmax): print vmin, vmax span = SpanSelector(ax, onselect, 'horizontal') onmove_callback is an optional callback that will be called on mouse move with the span range cCs|djotdddd}n||_d|_d|_t|_g|_d|_d|_ d|_ ||_ ||_ ||_ ||_||_t|_d|_|i|dS(s Create a span selector in ax. When a selection is made, clear the span and call onselect with onselect(vmin, vmax) and clear the span. direction must be 'horizontal' or 'vertical' If minspan is not None, ignore events smaller than minspan The span rect is drawn with rectprops; default rectprops = dict(facecolor='red', alpha=0.5) set the visible attribute to False if you want to turn off the functionality of the span selector Rctredtalphag?iN(ii(Rtdictt directionR%R'RRtcidstrectRtpressvt rectpropstonselecttonmove_callbackRtminspanR,t buttonDowntprevtnew_axes(RR%RRRRRR((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR (s$                c Cs||_|i|iij ox!|iD]}|ii|q)W|ii|_|ii|iid|i|ii|iid|i|ii|iid|i |ii|iid|i n|i djo+t |ii |ii}d \}}n(t |ii|ii }d \}}td ||d|d t|i|_|ip|ii|indS( NRRtbutton_release_eventRt horizontaliiRR(ii(ii(ii(R%R'R&Rtmpl_disconnectRmR(RtpressRtupdate_backgroundRRt transDataR!RR,RRRRn(RR%R7ttransRxRy((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRYs*  """&  cCs-|io|ii|ii|_ndS(s!force an update of the backgroundN(RR'RR%RR(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRss cCs+|i|ijp|i p |idjS(s&return True if event should be ignoredi(R4R%RRU(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pytignoreyscCsa|i|odSt|_|ii|i|idjo|i|_n |i |_t S(son button press eventNR( RRRRRlRRRVRRR,(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR}s  cCs |idjp|i|o|i odSt|_|iit|ii|i}|i djo|i p |i d}n|i p |i d}||jo||}}n||}|i dj o||i jodS|i||d|_tS(son button release eventNRii(RRRRR,RRlR'R9RRVRRRR(RR6tvmintvmaxtspan((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs"+       cCso|ioT|idj o|ii|in|ii|i|ii|ii n|ii t S(sBdraw using newfangled blit or oldfangled draw depending on useblitN( RRRR'RR%RRRRRR,(R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pytupdates  c Cs|idjp|i|odS|i|i}}||f|_|idjo |}n|}||i}}||jo||}}n|idjo(|ii||ii ||n%|ii ||ii |||i dj o}|i}|idjo|ip |id}n|ip |id}||jo||}}n|i ||n|i tS(son motion notify eventNRii(RRRRVRRRRtset_xt set_widthtset_yt set_heightRRR,( RR6RzRvtvtminvtmaxvRR((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs2      N( RRRRR,R RRRRRRR(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs1     tHorizontalSpanSelectorcBseZdZRS(cKs9ddk}|idtti|||d|dS(NisUse SpanSelector instead!R(twarningstwarntDeprecationWarningRR (RR%RRTR((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s (RRR (((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRstRectangleSelectorcBsteZdZdd d ed d ddZdZdZdZdZ dZ d Z d Z d Z RS( s Select a min/max range of the x axes for a matplotlib Axes Example usage:: from matplotlib.widgets import RectangleSelector from pylab import * def onselect(eclick, erelease): 'eclick and erelease are matplotlib events at press and release' print ' startposition : (%f, %f)' % (eclick.xdata, eclick.ydata) print ' endposition : (%f, %f)' % (erelease.xdata, erelease.ydata) print ' used button : ', eclick.button def toggle_selector(event): print ' Key pressed.' if event.key in ['Q', 'q'] and toggle_selector.RS.active: print ' RectangleSelector deactivated.' toggle_selector.RS.set_active(False) if event.key in ['A', 'a'] and not toggle_selector.RS.active: print ' RectangleSelector activated.' toggle_selector.RS.set_active(True) x = arange(100)/(99.0) y = sin(x) fig = figure ax = subplot(111) ax.plot(x,y) toggle_selector.RS = RectangleSelector(ax, onselect, drawtype='line') connect('key_press_event', toggle_selector) show() tboxtdatac Cs ||_t|_|ii|_|iid|i|iid|i|iid|i|iid|i t|_ d|_ d|_ |djod}t|_n|djos|djo%tdd d d d d dt}n||_tddddt|i|_ |ii|i n|djo||djo%tdd ddddd d }n||_tddgddgdt|i|_ |ii|i n||_||_||_||_| |_||_d|_d|_dS(sS Create a selector in ax. When a selection is made, clear the span and call onselect with onselect(pos_1, pos_2) and clear the drawn box/line. There pos_i are arrays of length 2 containing the x- and y-coordinate. If minspanx is not None then events smaller than minspanx in x direction are ignored(it's the same for y). The rect is drawn with rectprops; default rectprops = dict(facecolor='red', edgecolor = 'black', alpha=0.5, fill=False) The line is drawn with lineprops; default lineprops = dict(color='black', linestyle='-', linewidth = 2, alpha=0.5) Use type if you want the mouse to draw a line, a box or nothing between click and actual position ny setting drawtype = 'line', drawtype='box' or drawtype = 'none'. spancoords is one of 'data' or 'pixels'. If 'data', minspanx and minspanx will be interpreted in the same coordinates as the x and ya axis, if 'pixels', they are in pixels RRRRtnoneRRRctwhitet edgecolortblackRg?tfilliiRR0t linestylet-R^iN(ii(R%RRR&R'R(RRRRRRtto_drawRR,RRRRnRRRoRRtminspanxtminspanyt spancoordstdrawtypet eventpresst eventrelease( RR%RRR RRRRR((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR sF!          !   *       cCs-|io|ii|ii|_ndS(s!force an update of the backgroundN(RR'RR%RR(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRBs cCsq|iptS|iii|ptS|idjo|i|ijS|i|ijp|i |ii jS(s&return True if event should be ignoredN( RRR'RR RRR4R%RU(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRHs cCs5|i|odS|ii|i||_tS(son button press eventN(RR RlRRR,(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR\s  c Cs|idjp|i|odS|iit|ii||_|i djo6|ii |ii }}|ii |ii }}nS|i djo6|ii |ii }}|ii |ii }}n td||jo||}}n||jo||}}n||}||}|idj o ||ij}|idj o ||ij} |idjo|p| odS|idjo|o | odS|i|i|id|_d|_tS(son button release eventNRtpixelss%spancoords must be "data" or "pixels"RR(RRRR RlR,R'R9RRRVRRzRvR R RRR( RR6RtyminRtymaxtspanxtspanyt xproblemst yproblems((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRis8          cCso|ioT|idj o|ii|in|ii|i|ii|ii n|ii t S(sBdraw using newfangled blit or oldfangled draw depending on useblitN( RRRR'RR%RR RRRR,(R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs  cCsO|idjp|i|odS|i|i}}|idjo|ii|}}|ii|}}||jo||}}n||jo||}}n|ii||ii||ii |||ii |||i t S|idjo:|ii |ii|g|ii|g|i t SdS(s,on motion notify event if box/line is wantedNRR(RRRRVRRR RRRRRR,tset_data(RR6RzRvtminxtmaxxtminytmaxy((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs*     cCs ||_dS(s Use this to activate / deactivate the RectangleSelector from your program with an boolean variable 'active'. N(R(RR((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt set_activescCs|iS(s0 to get status of active mode (boolean variable)(R(R((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyt get_activesN(RRRRR,R RRRRRRRR (((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs! L   (  tLassocBs)eZdedZdZdZRS(c Cs||_|i|_|ii|_||_|o|ii|ii|_n|\}}||fg|_t|g|gdddddd|_ |ii |i ||_ g|_ |i i |iid|i|i i |iid|idS( NR R R0RR@iRR(RR&R'RRRRtvertsRRRotcallbackRRmR(t onreleaseR(RR%RXR#RRzRv((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR s    *  "cCs|idj o`|ii|i|ift|idjo|i|in|iii |i nd|_x!|i D]}|i i |qWdS(Ni(R"RRmRVRRdR#RRitremoveRRR'R(RR6R7((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR$s  cCs|idjodS|i|ijodS|idjodS|ii|i|if|ii t |i|i o@|i i |i|ii|i|i i|iin|i idS(Ni(R"RR4RRURmRVRRRRkRR'RRRRRR(RR6((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyRs N(RRRRR R$R(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyR!s (((((((RtnumpyRetmlabRtpatchesRRRiRt transformsRRRRR>R\RRRRRRRR!(((s8/usr/lib64/python2.6/site-packages/matplotlib/widgets.pyts$ % XwnNE