/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/legend.pyo (23703B)
6Jc@ s2dZddklZddkZddkZddklZddkl Z l Z ddk l Z l Z lZlZddklZddklZdd klZlZlZlZdd klZlZlZdd klZlZl Z l!Z!dd k"l#Z#l$Z$l%Z%l&Z&d e fdYZ'dS(s Place a legend on the axes at location loc. Labels are a sequence of strings and loc can be a string or an integer specifying the legend location The location codes are 'best' : 0, (only implemented for axis legends) 'upper right' : 1, 'upper left' : 2, 'lower left' : 3, 'lower right' : 4, 'right' : 5, 'center left' : 6, 'center right' : 7, 'lower center' : 8, 'upper center' : 9, 'center' : 10, Return value is a sequence of text, line instances that make up the legend i(tdivisionN(trcParams(tArtisttallow_rasterization(tis_string_liketiterablet silent_listtsafezip(tFontProperties(tLine2D(tPatcht RectangletShadowtFancyBboxPatch(tLineCollectiontRegularPolyCollectiontCircleCollection(tBboxtBboxBasetTransformedBboxtBboxTransformTo(tHPackertVPackertTextAreat DrawingAreatLegendcB seZdZh dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6Zd ZdZd-d-d-dd-d-d-d-d-d-d-d-d-d-d-d-d-dd-d-d-d-d-d-dZdZdZ dZ e dZ d-dZ dZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Zd)Zd-d*Zd+Zd-d,ZRS(.s Place a legend on the axes at location loc. Labels are a sequence of strings and loc can be a string or an integer specifying the legend location The location codes are:: 'best' : 0, (only implemented for axis legends) 'upper right' : 1, 'upper left' : 2, 'lower left' : 3, 'lower right' : 4, 'right' : 5, 'center left' : 6, 'center right' : 7, 'lower center' : 8, 'upper center' : 9, 'center' : 10, loc can be a tuple of the noramilzed coordinate values with respect its parent. Return value is a sequence of text, line instances that make up the legend itbestis upper rightis upper leftis lower leftis lower rightitrightis center leftis center rightis lower centeri s upper centeri tcentercC sdS(NR((tself((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt__str__Tsc(C s~ddkl}ddkl}ti|| d7jotdtd|_ nRt | t o8t| |_ d| jo|i i tdqn | |_ |i i |_dddd d g}t}xK|D]C} || d7jotd | }!n || }!t|| |!qWhd d 6dd6dd6dd6dd6}"|i}#t|#i|#i|i}$x|"iD]\}%}&||%d7j oJ||&d7jo9tid|&|%ftt||&||%|$q~n||&d7jot||&td |&q~t||&||&q~W~t|}t|djo d}n||_|idjotd|n|d7jotid8d9d:g|_ nti!||_ t"|it|i d}'ti#|i |'|i$ |_ d7|_%t ||ot&|_'|i(|i)n7t ||ot*|_'|i(|n t+d||_,|d7jo0td }|i' o|d;jo d"}qnt-|o||i.jop|i'o3tid#|d$i/|i.i0fd}qLtid%|d$i/|i.i0fd}qP|i.|}n|i' o$|djotid&d}n||_1||_2|i3||t4d'd<d)d*d+d*d,d-d.d/d0|id1t&|_5|d7jotd2}n|t&jo |i5i6d3d dd4d5n|i5i6d6d d|i7|i5t&|_8|i9|||i:||i|_;d7S(=s - *parent* : the artist that contains the legend - *handles* : a list of artists (lines, patches) to add to the legend - *labels* : a list of strings to label the legend Optional keyword arguments: ================ ================================================================== Keyword Description ================ ================================================================== loc a location code prop the font property markerscale the relative size of legend markers vs. original numpoints the number of points in the legend for line scatterpoints the number of points in the legend for scatter plot scatteryoffsets a list of yoffsets for scatter symbols in legend fancybox if True, draw a frame with a round fancybox. If None, use rc shadow if True, draw a shadow behind legend ncol number of columns borderpad the fractional whitespace inside the legend border labelspacing the vertical space between the legend entries handlelength the length of the legend handles handletextpad the pad between the legend handle and text borderaxespad the pad between the axes and legend border columnspacing the spacing between columns title the legend title bbox_to_anchor the bbox that the legend will be anchored. bbox_transform the transform for the bbox. transAxes if None. ================ ================================================================== The dimensions of pad and spacing are given as a fraction of the _fontsize. Values from rcParams will be used if None. Users can specify any arbitrary location for the legend using the *bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. See :meth:`set_bbox_to_anchor` for more detail. The legend location can be specified by setting *loc* with a tuple of 2 floats, which is interpreted as the lower-left corner of the legend in the normalized axes coordinate. i(tAxes(tFiguretsizeslegend.fontsizet numpointst markerscaletshadowt columnspacingt scatterpointsslegend.t borderpadtpadt labelspacingtlabelsept handlelengtht handlelent handletextpadt handletextsept borderaxespadtaxespadsUse '%s' instead of '%s'.iiis!numpoints must be >= 0; it was %dg@g @g@g@s,Legend needs either Axes or Figure as parents legend.locRs upper rightsLUnrecognized location "%s". Falling back on "best"; valid locations are %s s sSUnrecognized location "%s". Falling back on "upper right"; valid locations are %s siAutomatic legend placement (loc="best") not implemented for figure legend. Falling back on "upper right".txygtwidthg?theightt facecolortwt edgecolortktmutation_scaletsnapslegend.fancyboxtroundt rounding_sizeg?tsquareNg?g?g?(iR(gg(<tmatplotlib.axesRtmatplotlib.figureR Rt__init__tNoneRRtpropt isinstancetdicttset_sizetget_size_in_pointst _fontsizetlocalstsetattrtbboxtminR2R3titemstwarningstwarntDeprecationWarningtlisttlent_ncolR"t ValueErrortnptarrayt_scatteryoffsetstasarraytintttileR&t _legend_boxtTruetisaxest set_figuretfiguretFalset TypeErrortparentRtcodestjointkeyst_loct_modetset_bbox_to_anchorR t legendPatcht set_boxstylet_set_artist_propst _drawFramet_init_legend_boxt set_titlet_last_fontsize_points((RR`thandlestlabelstlocR"R#R&tscatteryoffsetsRAR(R*R,R.R0R'R)R+R-R/R%tncoltmodetfancyboxR$ttitletbbox_to_anchortbbox_transformRR t propnamest localdicttnametvaluetdeprecated_kwdsRItaxessize_fontsizeR7tvtreps((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyR?WsJ            "                                cC sN|i|ix$|iD]}|i|iqW|i|idS(sE set the boilerplate props for artists added to axes N(R\R]t get_childrent set_transformt get_transform(Rtatc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRi7s  cC s-|i|||\}}||||fS(s9Helper function to locate the legend at its best position(t_find_best_position(RR2R3txdescenttydescenttrenderertoxtoy((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt_findoffset_bestCsc C st|io^t|idjoH|i\}}|i}|i|i||i|i|} } n@ti dd||}|i |i||i|\} } | || |fS(s;Heper function to locate the legend using the location codeii( RRdRPtget_bbox_to_anchortx0R2ty0R3Rt from_boundst_get_anchored_bbox( RR2R3RRRtfxtfyRItxty((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt_findoffset_locHs& -'c sx|ipdSid|idjo |in |ifd}|ii|i|i}|i djo9d|i |i |}|ii |i i|n|io|ii}|ii|i|i|i|i|ii||io&t|idd}|in|iin|iiiddS( s*Draw everything that belongs to the legendNtlegendic s||||S(N((R2R3RR(t _findoffsetR(sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt findoffsetgstexpandii(R(t get_visiblet open_groupRdRRRYt set_offsettpoints_to_pixelsRFReR/R't set_widthRR2Rjtget_window_extentRgt set_boundsRRR3tset_mutation_scaleR$R tdrawt close_group(RRRtfontsizeR(RIR$((RRsD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRVs.    !  cC s)|djo|iS|i|iSdS(sm Return the approximate height of the text. This is used to place the legend handle. N(R@RFR(RR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt_approx_text_heights c,C s|i}g}g}tddddd|i}g}xI|D]A}t|d|dtdt} |i| i|i| q@Wg} |id } d } x|D]} t| t pt| t o |i }n |i }|d jo.t id ||id ||}|}nB|d jo4t id |i|d}d|i|g}nt| to| | dt i|it}t||}|i| |i||id(|id(|id|id|i|t||t| }|i| |i||id(|id(|id||_nt| toktdd)d|i|d| | }|i| |i||id(|id(|i|nt| t o| | dt i|it}t||}|i||id(|id(| i!d }| i"d }| i#d }|i$||i%||d d(j o|i&|d n|i|n2t| t o| |i'}t(| i)t*| i)}}|i djod||||g}n%||t id d |i |}t+| | i,d| i-d|dt.||d|i/}|i| |i0|i1|id(|id(|i|nt| t o| |i'}t(| i)t*| i)}}|i djod||||g}n%||t id d |i |}t+| |dt.||d|i/}|i| |i0|i1|id(|id(|i|n|id(t2d|i|d| dd d| }|d} |i3| t4| do|i3| in| i|qWt*|i5t| }t6t| |\}}||}t7t8d ||d |d |d g|} t7t8||d t| ||g|}!t7| |}"g}#x| |!D]\}$}%g}&|"|$|$|%!D];\}'}(|&t9dd d |i:|d!|'|(gd"dqK~&})|)di;d i<t=|#it>dd d |i?|d"dd!|)q)W|i@d#jo d#}*nd$}*|iA|}+t9dd d |+d"dd%|*d!|#|_Btd&|_Ct>d|iD|d |i?|d"d'd!|iC|iBg|_E|iEi0|i1||_F||_Gd(S(*s Initiallize the legend_box. The legend_box is an instance of the OffsetBox, which is packed with legend handles and texts. Once packed, their location is calculated during the drawing time. tverticalalignmenttbaselinethorizontalalignmenttlefttfontpropertiest textpropstmultilinebaselinetminimumdescentgffffff?gig333333?iig?g@tdefaultR@R1R2R3itrotationtsizestoffsetst transOffsetRRit _legmarkerR(tseptchildrentalignRtfixedRstRN(gg(HRFRCRARRZtappendt_textRRBRRR&R"RStlinspaceR+R tonestshapetfloatt update_fromRit set_clip_boxR@t set_clip_patht set_drawstylet set_markerRPt set_linestyleRR R Rt get_linewidtht get_dashest get_colorst set_colort set_linewidtht set_dashesRUtmaxt get_sizesRJttypet get_numsidest get_rotationtzipRR\R]Rt add_artistthasattrRQtdivmodRtrangeRR-Rtset_minimumdescentR^RR)ReR%t_legend_handle_boxt_legend_title_boxR'RYttextst legendHandles(,RRnRoRt text_listt handle_listt label_propt labelboxestlttextboxt handleboxesR3tdescentthandletnpointstxdatat xdata_markertydatatleglinetlegline_markertptlwtdashestcolortsize_maxtsize_minRt handleboxRrtnrowst num_largecolt num_smallcoltlargecoltsmallcolt handle_labelt columnboxti0tdit_[1]thttt itemBoxesRsR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRks(           !                    !       $      $         S        c C s|i}g}g}g}xE|iD]:}|i}|i}|i|}|i|q%Wxu|iD]j}t|to,|i } |i|i i | qm|i} |i|ii | qmW|||gS(s{ Returns list of vertices and extents covered by the plot. Returns a two long list. First element is a list of (x, y) vertices (in display-coordinates) covered by all the lines and line collections, in the legend's handles. Second element is a list of bounding boxes for all the patches in the legend's handles. ( R`tlinestget_pathRttransform_pathRtpatchesRBR tget_data_transformtget_bboxt transformedt get_extents( RtaxtverticestbboxesRRtpathttransttpatht transform((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt_auto_legend_datas$         cC s ||_dS(s$b is a boolean. Set draw frame to bN(Rj(Rtb((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt draw_framescC s(g}|io|i|in|S(sreturn a list of child artists(RYR(RR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRs cC s|iS(s6return the Rectangle instance used to frame the legend(Rg(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt get_framescC s6g}|iD]!}t|to ||qq~S(s5return a list of lines.Line2D instances in the legend(RRBR (RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt get_linesscC s?tdg}|iD]!}t|to ||qq~S(s.return a list of patch instances in the legendR (RRRBR (RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt get_patchesscC std|iS(s1return a list of text.Text instance in the legendtText(RR(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt get_textsscC sB|iii||o|iitn|iitdS(sset the legend titleN(RRtset_textt set_visibleRZR^(RRu((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRlscC s |iiS(s)return Text instance for the legend title(RR(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyt get_titlescC s |iiS(s!return a extent of the the legend(RgR(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRscC s&|idjo |iiS|iSdS(sB return the bbox that the legend will be anchored N(t_bbox_to_anchorR@R`RI(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRs cC s|djod|_dSt|to ||_nzyt|}Wn)tj otdt|nX|djo|d|dddg}nti ||_|djot |i i }nt |i||_dS(s> set the bbox that the legend will be anchored. *bbox* can be a BboxBase instance, a tuple of [left, bottom, width, height] in the given transform (normalized axes coordinate if None), or a tuple of [left, bottom] where the width and height will be assumed to be zero. NsInvalid argument for bbox : %siii(R@RRBRRPR_RRtstrRRRR`RIR(RRIR R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRfs      c C std\ }}}}} } } } } }}h d|6d|6d|6d| 6d| 6d| 6d| 6d| 6d |6d |6}||}|i|i}|i|i |}|i|d |}|i|ifS( s Place the *bbox* inside the *parentbbox* according to a given location code. Return the (x,y) coordinate of the bbox. - loc: a location code in range(1, 11). This corresponds to the possible values for self._loc, excluding "best". - bbox: bbox to be placed, display coodinate units. - parentbbox: a parent box which will contain the bbox. In display coordinates. i tNEtNWtSWtSEtEtWtStNtCt container(RRRFtpaddedR/tanchoredRR(RRpRIt parentbboxRtBESTtURtULtLLtLRtRtCLtCRtLCtUCR!t anchor_coefsRRR"t anchored_box((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyRs -   c C s|i\}}}tidd||}g} tdt|iD]%} | |i| ||i|qJ~ }g} x|D]\} } ti| | ||}d}|i|}||i |7}x,|D]$}|i |o|d7}qqW| | }}|djo ||fS| i || | ffqW| d}x-| D]%}|d|djo |}qSqSW|d\}}||fS(s Determine the best location to place the legend. `consider` is a list of (x, y) pairs to consider as a potential lower-left corner of the legend. All are display coords. ii( R RRRRPRaRRtcount_containstcount_overlapstintersects_bboxR(RR2R3RtconsidertvertsRRRIRRt candidatesRR t legendBoxtbadnesstlineRRt minCandidatet candidate((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyR's4 D     N(t__name__t __module__t__doc__RatzorderRR@R?RiRRRRRRkR RRRRRRRlRRRRfRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyR)st     1 (         ! #((R?t __future__RRLtnumpyRSt matplotlibRtmatplotlib.artistRRtmatplotlib.cbookRRRRtmatplotlib.font_managerRtmatplotlib.linesR tmatplotlib.patchesR R R R tmatplotlib.collectionsRRRtmatplotlib.transformsRRRRtmatplotlib.offsetboxRRRRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/legend.pyts  """"