/opt/alt/python27/lib64/python2.7/site-packages/matplotlib
NameSizeModeActions
backends/-0755rm
delaunay/-0755rm
mpl-data/-0755rm
numerix/-0755rm
projections/-0755rm
sphinxext/-0755rm
afm.py150890644editdlrm
afm.pyc173880644editdlrm
afm.pyo173880644editdlrm
artist.py356230644editdlrm
artist.pyc414310644editdlrm
artist.pyo414310644editdlrm
axes.py2800890644editdlrm
axes.pyc2525680644editdlrm
axes.pyo2514560644editdlrm
axis.py573540644editdlrm
axis.pyc608580644editdlrm
axis.pyo605510644editdlrm
backend_bases.py723180644editdlrm
backend_bases.pyc799690644editdlrm
backend_bases.pyo798790644editdlrm
bezier.py149170644editdlrm
bezier.pyc138120644editdlrm
bezier.pyo138120644editdlrm
blocking_input.py136900644editdlrm
blocking_input.pyc147620644editdlrm
blocking_input.pyo144440644editdlrm
cbook.py427560644editdlrm
cbook.pyc586920644editdlrm
cbook.pyo584660644editdlrm
cm.py80980644editdlrm
cm.pyc100320644editdlrm
cm.pyo100320644editdlrm
collections.py407840644editdlrm
collections.pyc451110644editdlrm
collections.pyo451110644editdlrm
colorbar.py274560644editdlrm
colorbar.pyc258350644editdlrm
colorbar.pyo258350644editdlrm
colors.py391100644editdlrm
colors.pyc406900644editdlrm
colors.pyo406900644editdlrm
contour.py428950644editdlrm
contour.pyc364630644editdlrm
contour.pyo363010644editdlrm
dates.py360070755editdlrm
dates.pyc411350644editdlrm
dates.pyo410710644editdlrm
dviread.py320330644editdlrm
dviread.pyc354880644editdlrm
dviread.pyo353450644editdlrm
figure.py412640644editdlrm
figure.pyc437060644editdlrm
figure.pyo435750644editdlrm
finance.py205820644editdlrm
finance.pyc186750644editdlrm
finance.pyo185150644editdlrm
fontconfig_pattern.py64290644editdlrm
fontconfig_pattern.pyc67100644editdlrm
fontconfig_pattern.pyo67100644editdlrm
font_manager.py426530644editdlrm
font_manager.pyc412750644editdlrm
font_manager.pyo412750644editdlrm
ft2font.so3061680755editdlrm
hatch.py65640644editdlrm
hatch.pyc94840644editdlrm
hatch.pyo94840644editdlrm
image.py315400644editdlrm
image.pyc337830644editdlrm
image.pyo337370644editdlrm
legend.py323020644editdlrm
legend.pyc238760644editdlrm
legend.pyo237030644editdlrm
lines.py546850644editdlrm
lines.pyc579910644editdlrm
lines.pyo578860644editdlrm
mathtext.py1020090644editdlrm
mathtext.pyc1060700644editdlrm
mathtext.pyo1056820644editdlrm
mlab.py942940644editdlrm
mlab.pyc1019150644editdlrm
mlab.pyo1017350644editdlrm
mpl.py7850644editdlrm
mpl.pyc11890644editdlrm
mpl.pyo11890644editdlrm
nxutils.so97040755editdlrm
offsetbox.py298070644editdlrm
offsetbox.pyc348250644editdlrm
offsetbox.pyo347700644editdlrm
patches.py1284850644editdlrm
patches.pyc1337360644editdlrm
patches.pyo1335980644editdlrm
path.py217650644editdlrm
path.pyc214990644editdlrm
path.pyo212790644editdlrm
pylab.py109810644editdlrm
pylab.pyc124380644editdlrm
pylab.pyo124380644editdlrm
pyparsing.py1439240644editdlrm
pyparsing.pyc1511830644editdlrm
pyparsing.pyo1511830644editdlrm
pyplot.py824680644editdlrm
pyplot.pyc819820644editdlrm
pyplot.pyo819820644editdlrm
quiver.py375400644editdlrm
quiver.pyc341520644editdlrm
quiver.pyo341520644editdlrm
rcsetup.py234340644editdlrm
rcsetup.pyc215220644editdlrm
rcsetup.pyo213520644editdlrm
scale.py142330644editdlrm
scale.pyc202540644editdlrm
scale.pyo202540644editdlrm
spines.py126840644editdlrm
spines.pyc118830644editdlrm
spines.pyo114560644editdlrm
table.py168280644editdlrm
table.pyc173730644editdlrm
table.pyo172220644editdlrm
texmanager.py224640644editdlrm
texmanager.pyc202090644editdlrm
texmanager.pyo202090644editdlrm
text.py598220644editdlrm
text.pyc606960644editdlrm
text.pyo606960644editdlrm
ticker.py404280644editdlrm
ticker.pyc521640644editdlrm
ticker.pyo520280644editdlrm
tight_bbox.py36550644editdlrm
tight_bbox.pyc41570644editdlrm
tight_bbox.pyo41570644editdlrm
transforms.py753870644editdlrm
transforms.pyc924320644editdlrm
transforms.pyo915230644editdlrm
ttconv.so654880755editdlrm
type1font.py115370644editdlrm
type1font.pyc114900644editdlrm
type1font.pyo114900644editdlrm
units.py49760644editdlrm
units.pyc59180644editdlrm
units.pyo59180644editdlrm
widgets.py408330644editdlrm
widgets.pyc436080644editdlrm
widgets.pyo434220644editdlrm
windowing.py4540644editdlrm
windowing.pyc13610644editdlrm
windowing.pyo13610644editdlrm
_cm.py3704140644editdlrm
_cm.pyc1030550644editdlrm
_cm.pyo1030550644editdlrm
_cntr.so209600755editdlrm
_delaunay.so611840755editdlrm
_image.so2828560755editdlrm
_mathtext_data.py579900644editdlrm
_mathtext_data.pyc638000644editdlrm
_mathtext_data.pyo638000644editdlrm
_path.so2803120755editdlrm
_png.so1565040755editdlrm
_pylab_helpers.py27150644editdlrm
_pylab_helpers.pyc38380644editdlrm
_pylab_helpers.pyo38380644editdlrm
__init__.py289720644editdlrm
__init__.pyc294350644editdlrm
__init__.pyo293810644editdlrm
Edit: /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyo (43422B)
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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt__init__scCs-|i|ptdn||_dS(sreserve the lock for osalready lockedN(t availablet ValueErrorR(Rto((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt__call__scCs-|i|ptdnd|_dS(srelease the locksyou do not own this lockN(R R RR(RR ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pytrelease"scCs|i p |i|S(sdrawing is available to o(tlockedtisowner(RR ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR (scCs |i|jS(so owns the lock(R(RR ((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR,scCs |idj S(sthe lock is heldN(RR(R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR0s( t__name__t __module__t__doc__R R RR RR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRs     tWidgetcBseZdZeZeZRS(sT OK, I couldn't resist; abstract base class for mpl GUI neutral widgets (RRRtTruetdrawonteventson(((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR Os$          cCsU|i|ijodS|ipdSx'|iiD]\}}||q7WdS(N(tinaxesR%RR$titems(Rteventtcidtfunc((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR)ws  cCs{|i|ijo |i}n |i}||ijo>|ii|||_|io|iiii qwndS(N( R4R%R1R0R2R-RR&R'tdraw(RR6tc((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt on_clickeds  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$tKeyError(RR7((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt disconnectsN( RRRRR R)R*R;R=(((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt on_changeds  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$R<(RR7((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR=scCs+|i|ijo|i|indS(s/reset the slider to the initial value if neededN(RERFRW(R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pytresetsN( RRRRRR RMRWRZR=R[(((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR;s  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$R<(RR7((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR=s(RRRR RpR;R=(((sE/opt/alt/python27/lib64/python2.7/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{((sE/opt/alt/python27/lib64/python2.7/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(sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pytinsides#(RUR4R%R!tinvertedttransform_pointRzRvReRRkRRhR~RRRgt set_facecolorRR&R'R9RR$R5R( RR6RXRR{RwtinpRR0R7R8((RsE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR;s  cCs(y|i|=Wntj onXdS(s*remove the observer with connection id cidN(R$R<(RR7((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR=s(RRRR RpR;R=(((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR scSs*d|iii|iif}||S(Ns%s=%s(RR"RRK(RRzRvtfmt((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR s"(RRR R (((sE/opt/alt/python27/lib64/python2.7/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(sE/opt/alt/python27/lib64/python2.7/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((RRRsE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR sR ******  cCs5|iid||io|iiindS(NRB(RRRR'R9(RRE((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRjs cCs5|iid||io|iiindS(NRA(RRRR'R9(RRE((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRns cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRrs cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRvs cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRzs cCs5|iid||io|iiindS(NR(RRRR'R9(RRE((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR~s ( RRRR RRRRRR(((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR s     %% cCsM|io|ii|ii|_n|iit|i itdS(sclear the cursorN( RR'tcopy_from_bboxR%tbboxRRRlR,R(RR6((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRMs  (RRRR,R RRRM(((sE/opt/alt/python27/lib64/python2.7/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%((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR s  6    cCsQ|io"|ii|iii|_nx|iD]}|itq6WdS(sclear the cursorN( RR'RR&RRRiRlR,(RR6tline((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRM s  (RRRRR RRRM(((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRYs*  """&  cCs-|io|ii|ii|_ndS(s!force an update of the backgroundN(RR'RR%RR(RR6((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRss cCs+|i|ijp|i p |idjS(s&return True if event should be ignoredi(R4R%RRU(RR6((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pytignoreyscCsa|i|odSt|_|ii|i|idjo|i|_n |i |_t S(son button press eventNR( RRRRRlRRRVRRR,(RR6((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRs2      N( RRRRR,R RRRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRs1     tHorizontalSpanSelectorcBseZdZRS(cKs9ddk}|idtti|||d|dS(NisUse SpanSelector instead!R(twarningstwarntDeprecationWarningRR (RR%RRTR((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR s (RRR (((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR sF!          !   *       cCs-|io|ii|ii|_ndS(s!force an update of the backgroundN(RR'RR%RR(RR6((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRHs cCs5|i|odS|ii|i||_tS(son button press eventN(RR RlRRR,(RR6((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt set_activescCs|iS(s0 to get status of active mode (boolean variable)(R(R((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyt get_activesN(RRRRR,R RRRRRRRR (((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/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((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyRs N(RRRRR R$R(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyR!s (((((((RtnumpyRetmlabRtpatchesRRRiRt transformsRRRRR>R\RRRRRRRR!(((sE/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/widgets.pyts$ % XwnNE