Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/matplotlib/__pycache__/spines.cpython-37.pyc

211 lines
14 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<>]!Z<00>@sjddlZddlZddlmZmZmZddlmZddlm Z
ddl m Z ddlmZGdd<05>de j<11>ZdS)<06>N)<03>cbook<6F> docstring<6E>rcParams)<01>allow_rasterizationcseZdZdZdd<03>Zej<06>fdd<05><08>Zdd<07>Zdd <09>Z d
d <0B>Z
d d <0A>Z dd<0F>Z dd<11>Z <0A>fdd<13>Zd:<3A>fdd<16> Zdd<18>Zdd<1A>Zdd<1C>Zdd<1E>Ze<14>d<1F>d d!<21><00>Zd"d#<23>Ze<18>fd$d%<25><08>Zd&d'<27>Zd(d)<29>Zd*d+<2B>Zd,d-<2D>Zd.d/<2F>Zd0d1<64>Ze d2d3<64><00>Z!e d4d5<64><00>Z"e d6d7<64><00>Z#d8d9<64>Z$<24>Z%S);<3B>Spinea<65>an axis spine -- the line noting the data area boundaries
Spines are the lines connecting the axis tick marks and noting the
boundaries of the data area. They can be placed at arbitrary
positions. See function:`~matplotlib.spines.Spine.set_position`
for more information.
The default position is ``('outward',0)``.
Spines are subclasses of class:`~matplotlib.patches.Patch`, and
inherit much of their behavior.
Spines draw a line, a circle, or an arc depending if
function:`~matplotlib.spines.Spine.set_patch_line`,
function:`~matplotlib.spines.Spine.set_patch_circle`, or
function:`~matplotlib.spines.Spine.set_patch_arc` has been called.
Line-like is the default.
cCsdS)Nr<00>)<01>selfrr<00>9/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/spines.py<70>__str__sz Spine.__str__c s<>t<00>jf|<04>||_|<00>|jj<04>||_|<00>d<01>|<00>td<00>|<00> td<00>|<00>
d<04>d|_ |<00> d<06>|<00> |jj<0E>d|_d|_d|_t|tjj<15>s<>td<08><01>||_d |_t<19><1A>|_dS)
z<EFBFBD>
- *axes* : the Axes instance containing the spine
- *spine_type* : a string specifying the spine type
- *path* : the path instance used to draw the spine
Valid kwargs are:
%(Patch)s
<20>nonezaxes.edgecolorzaxes.linewidthZ
projectingNg@Fz4'path' must be an instance of 'matplotlib.path.Path'<27>line)<1C>super<65>__init__<5F>axesZ
set_figure<EFBFBD>figure<72>
spine_typeZ set_facecolor<6F> set_edgecolorrZ set_linewidthZ set_capstyle<6C>axisZ
set_zorder<EFBFBD> set_transform<72> transData<74>_bounds<64> _smart_bounds<64> _position<6F>
isinstance<EFBFBD>
matplotlib<EFBFBD>path<74>Path<74>
ValueError<EFBFBD>_path<74> _patch_type<70> mtransforms<6D>IdentityTransform<72>_patch_transform)rrrr<00>kwargs)<01> __class__rr r"s(



zSpine.__init__cCsB||_|jdkr |jj<03>|<01>n|jdkr8|jj<05>|<01>d|_dS)z7Set the spine and associated axis to have smart bounds.)<02>left<66>right)<02>top<6F>bottomTN)rrrZyaxis<69>set_smart_boundsZxaxis<69>stale)r<00>valuerrr r)Qs 

zSpine.set_smart_boundscCs|jS)z*Return whether the spine has smart bounds.)r)rrrr <00>get_smart_bounds\szSpine.get_smart_boundscCsTd|_||_|d|_|d|_||_||_tj<07>||<04>|_ |<00>
|j j <0C>d|_ dS)zSet the spine to be arc-like.<2E>arc<72>TN)r<00>_center<65>_width<74>_heightZ_theta1Z_theta2<61>mpathrr-rrr<00> transAxesr*)r<00>center<65>radius<75>theta1<61>theta2rrr <00> set_patch_arc`s

zSpine.set_patch_arccCs8d|_||_|d|_|d|_|<00>|jj<06>d|_dS)zSet the spine to be circular.<2E>circler.TN)rr/r0r1rrr3r*)rr4r5rrr <00>set_patch_circlems 

zSpine.set_patch_circlecCsd|_d|_dS)zSet the spine to be linear.r TN)rr*)rrrr <00>set_patch_linewszSpine.set_patch_linecCsj|jdkst<01>|<00>|jd<00>|<00>|jd<00>f}|<00>|j<05>}|<00>|j<06>}t<07><08><00> |d|d<00>j
|<01>|_ dS)aNOTE: This cannot be called until after this has been added
to an Axes, otherwise unit conversion will fail. This
makes it very important to call the accessor method and
not directly access the transformation member variable.
)r-r9r<00>g<00>?N) r<00>AssertionErrorZconvert_xunitsr/Zconvert_yunitsr0r1r <00>Affine2DZscale<6C> translater")rr4<00>width<74>heightrrr <00>_recompute_transform}s  zSpine._recompute_transformcs&|jdkr|<00><01>|jSt<03><00><04>SdS)N)r-r9)rrBr"r <00>get_patch_transform)r)r$rr rC<00>s
zSpine.get_patch_transformNc s<>|<00><00>t<01>j|d<01>}|jdkr$|S|g}|jjdg}t|jj<06>dkrZ|<04>|jjd<00><00>x,|D<00>]"}|<02><08>}|j }|j
}|dkr<>d} d}
n|dkr<>d} d}
nd} d}
| |d|j j } |
|d|j j }
|j <0A><0E><00>r&|jd k<06>r|j| |_|j|
|_n$|jd
k<06>r&|j| |_|j|
|_|j<14><0E><00>r||jd k<06>rX|j| |_|j|
|_n$|jd k<06>r||j| |_|j| |_|<03>|<06>qbWtj<16>|<03>S) a
Return the window extent of the spines in display space, including
padding for ticks (but not their labels)
See Also
--------
matplotlib.axes.Axes.get_tightbbox
matplotlib.axes.Axes.get_window_extent
)<01>rendererNrr<<00>out<75>ing<00>?<3F>H)r%)r()r&)r')<18>_adjust_locationr <00>get_window_extentrZ
majorTicks<EFBFBD>lenZ
minorTicks<EFBFBD>append<6E>frozen<65>_sizeZ_tickdirrZdpiZ tick1lineZ get_visiblerZx0<78>x1Zy0<79>y1Z tick2liner ZBbox<6F>union) rrDZbbZbboxesZ tickstocheckZtickZbb0ZticklZtickdirZpadoutZpadin)r$rr rI<00>sL 
            zSpine.get_window_extentcCs|jS)N)r)rrrr <00>get_path<74>szSpine.get_pathcCs |jdkrd|_|<00>|j<00>dS)N)<02>outwardg)r<00> set_position)rrrr <00>_ensure_position_is_set<65>s
zSpine._ensure_position_is_setcCs$||_|jdk r|j<00><01>d|_dS)z<>Register an axis.
An axis should be registered with its corresponding spine from
the Axes instance. This allows the spine to clear any axis
properties when needed.
NT)r<00>clar*)rrrrr <00> register_axis<69>s

zSpine.register_axiscCsd|_|jdk r|j<01><02>dS)zClear the current spine.N)rrrU)rrrr rU<00>s
z Spine.claz3.1cCsj|<00><00>|j}t|t<03>r2|dkr&d}n |dkr2d}t|<01>dkrFtd<06><01>|\}}|dkrb|dkrbd Sd
Sd S) z<>Return True if directly on axes frame.
This is useful for determining if a spine is the edge of an
old style MPL plot. If so, this function will return True.
r4)rg<00>?<3F>zero)<02>datarr.zposition should be 2-tuplerRrTFN)rTrr<00>strrJr)r<00>position<6F> position_type<70>amountrrr <00> is_frame_like<6B>s
 zSpine.is_frame_likecCs|jdkrdS|jdk<08>rh|jdkr4|jjj\}}n(|jdkrN|jjj\}}ntd|j<00><01>|j<07>rrt||g<02>\}}|jdkr<>|jj j\}}|j<02>
<EFBFBD>}n"|jdkr<>|jj j\}}|j<02> <0B>}t <0C> |<07>}t||g<02>\}}||kr<>|}n:||k||k@}||} t| <09><01>r| d}n|}t||<03>}||k<04>r,|}n:||k||k@}||} t| <09><01>rX| d}n|}t||<04>}n
|j\}}|jdk<02>r<>|jd k<06>r<>y|j<02><12>}
Wntk
<EFBFBD>r<>d
}
YnXy|j<02><14>} Wntk
<EFBFBD>r<>d} YnX||
| }||
| }||k<04>r
||}}tj<16>t <0C>|<01>t <0C>|<02><01>|_|jd k<02>r<>|jjj\} } y|j<02><1A>}Wntk
<EFBFBD>rh| }YnX| || |}||_||_ntd |j<00><01>nf|jj}|jd k<02>s<>td<0E><01>|jdk<06>r<>||d<||d<n,|jd k<06>r<>||d<||d<ntd |j<00><01>dS)z4Automatically set spine bounds to the view interval.r9N)r%r&)r'r(zunknown spine spine_type: %s<><73><EFBFBD><EFBFBD><EFBFBD>rr-)r(r'r<r(z#unable to set bounds for spine "%s")r.r.zunexpected vertices shape)rr<)r<r<)rr)r<r) rrrZviewLimZ intervalyZ intervalxrr<00>sortedZdataLimZ
get_yticksZ
get_xticks<EFBFBD>np<6E>sortrJ<00>max<61>minrZget_theta_direction<6F>AttributeErrorZget_theta_offsetr2rr-Zrad2degrZ get_roriginr1r0Zvertices<65>shaper=)r<00>low<6F>highZ viewlim_lowZ viewlim_highZ datalim_lowZ datalim_highZticksZcondZtickvals<6C> direction<6F>offsetZrminZrmaxZroriginZscaled_diameterZv1rrr rH<00>s<>
 



 








 
  

  

 
  
 
zSpine._adjust_locationcs|<00><00>t<01><00>|<01>}d|_|S)NF)rHr <00>drawr*)rrD<00>ret)r$rr rjjs z
Spine.drawc Cs<>|<00><00>|j}t|t<03>r2|dkr&d}n |dkr2d}t|<01>dksFtd<06><01>|\}}|dksZt<05>|dkr<>|d krzd
t<06><07>f|_nv|j d kr<>d d ddd<10>|j }||d d}||dd}dt<06>
|||j j <0C>f|_nt <0A>d|j <00>d
t<06><07>f|_<08>n|dk<02>rr|j dk<06>r(dtj<0F>d d d d|d <09>f|_nH|j dk<06>rRdtj<0F>dd d d d |<03>f|_nt <0A>d|j <00>d
t<06><07>f|_n<>|dk<02>r<>|j dk<06>r<>|d8}|j dk<06>r<>dt<06><0F><00>|d <09>f|_nB|j dk<06>r<>dt<06><0F><00>d |<03>f|_nt <0A>d|j <00>d
t<06><07>f|_dS)z6Calculate the offset transform performed by the spine.r4)rg<00>?rW)rXrr.zposition should be 2-tuple)rrRrXrRr<00>identity)r%r&r'r()r^r)r<r)rr^)rr<)r%r&r(r'gR@r<<00>postz2unknown spine type "%s": no spine offset performedr)r%r&<00>pre)r(r'rX)r&r'N)rTrrrYrJr=r r!<00>_spine_transformrZScaledTranslationrZdpi_scale_transrZ_warn_externalr>Z from_valuesr?)rrZr[r\Z
offset_vecZoffset_xZoffset_yrrr <00>_calc_offset_transformqsv
 


  

   
zSpine._calc_offset_transformcCsl|dkr
n(t|<01>dkrtd<03><01>|ddkr2td<06><01>||_|<00><03>|<00>|<00><05><00>|jdk rb|j<06><07>d|_dS) aqSet the position of the spine.
Spine position is specified by a 2 tuple of (position type,
amount). The position types are:
* 'outward' : place the spine out from the data area by the
specified number of points. (Negative values specify placing the
spine inward.)
* 'axes' : place the spine at the specified Axes coordinate (from
0.0-1.0).
* 'data' : place the spine at the specified data coordinate.
Additionally, shorthand notations define a special positions:
* 'center' -> ('axes',0.5)
* 'zero' -> ('data', 0.0)
)r4rWr.z&position should be 'center' or 2-tupler)rRrrXz:position[0] should be one of 'outward', 'axes', or 'data' NT) rJrrrpr<00>get_spine_transformrZ reset_ticksr*)rrZrrr rS<00>s  

zSpine.set_positioncCs|<00><00>|jS)zReturn the spine position.)rTr)rrrr <00> get_position<6F>szSpine.get_positioncCs<>|<00><00>|j\}}|dkr<>|jj||jj|jj}|jdkrRt<07>||jj <09>}n*|jdkrnt<07>|jj |<03>}nt
d|j<00><01>|S|jdkr<>|jj dd<06>}n(|jdkr<>|jj dd<06>}nt
d|j<00><01>|dkr<>|S|dkr<>||S|d kr<>||St
d
|<00><01>d S) zReturn the spine transform.rX)r%r&)r'r(zunknown spine spine_type: %sZgrid)<01>whichrlrmrnz unknown spine_transform type: %sN) rTrorZ
transScaleZ transLimitsr3rr Zblended_transform_factoryrrZget_yaxis_transformZget_xaxis_transform)r<00>what<61>howZ
data_xform<EFBFBD>resultZbase_transformrrr rq<00>s6






zSpine.get_spine_transformcCs&|jdkrtd<02><01>||f|_d|_dS)zSet the bounds of the spine.r9z5set_bounds() method incompatible with circular spinesTN)rrrr*)rrfrgrrr <00>
set_bounds s


zSpine.set_boundscCs|jS)zGet the bounds of the spine.)r)rrrr <00>
get_boundsszSpine.get_boundscKs<>|dkrt<00>ddg<02>}nT|dkr0t<00>ddg<02>}n<|dkrHt<00>ddg<02>}n$|dkr`t<00>ddg<02>}n td |<00><01>||||f|<03>}|<05>td
<EFBFBD>|<02><00>|S) zA
(staticmethod) Returns a linear :class:`Spine`.
r%)gg+<2B><16><><EFBFBD><EFBFBD>?r&)g<00>?g+<2B><16><><EFBFBD><EFBFBD>?r()g+<2B><16><><EFBFBD><EFBFBD>?gr')g+<2B><16><><EFBFBD><EFBFBD>?g<00>?z"unable to make path for spine "%s"zaxes.spines.{0})r2rrZ set_visibler<00>format)<06>clsrrr#rrvrrr <00> linear_spines zSpine.linear_spinec
Ks2tj<01>||<06>}||||f|<07>} | <09>||||<06>| S)z>
(classmethod) Returns an arc :class:`Spine`.
)r2rr-r8)
rzrrr4r5r6r7r#rrvrrr <00> arc_spine-szSpine.arc_spinecKs.tj<01><02>}d}||||f|<04>}|<07>||<03>|S)zC
(staticmethod) Returns a circular :class:`Spine`.
r9)r2rZ unit_circler:)rzrr4r5r#rrrvrrr <00>circular_spine8s

 zSpine.circular_spinecCs|<00>|<01>d|_dS)aJ
Set the edgecolor.
Parameters
----------
c : color
Notes
-----
This method does not modify the facecolor (which defaults to "none"),
unlike the `Patch.set_color` method defined in the parent class. Use
`Patch.set_facecolor` to set the facecolor.
TN)rr*)r<00>crrr <00> set_colorCs
zSpine.set_color)N)&<26>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r
rZdedent_interpdrr)r,r8r:r;rBrCrIrQrTrVrUr<00>
deprecatedr]rHrrjrprSrrrqrwrx<00> classmethodr{r|r}r<00> __classcell__rr)r$r r s8/  
 : lJ'%  r)Znumpyr`rrrrZmatplotlib.artistrZmatplotlib.transformsZ
transformsr Zmatplotlib.patchesZpatchesZmpatchesZmatplotlib.pathrr2ZPatchrrrrr <00><module>s