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

869 lines
52 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<>]]<00>@s*dZddlmZddlZddlmZddlZddlm Z
ddl m Z ddl mZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl"m#Z$ddl%m&Z&Gdd<07>dej'<27>Z(Gdd <09>d e)<29>Z*d
d <0B>Z+d d <0A>Z,dd<0F>Z-Gdd<11>dej.e*<2A>Z/Gdd<13>de/<2F>Z0dS)zQ
These are classes to support contour plotting and labelling for the Axes class.
<EFBFBD>)<01>IntegralN)<01>ma)<01>BlockingContourLabelerc@seZdZdZdd<03>ZdS)<05>
ClabelTextz<EFBFBD>
Unlike the ordinary text, the get_rotation returns an updated
angle in the pixel coordinate assuming that the input rotation is
an angle in data coordinate (or whatever transform set).
cCsHtj<01>|<00>}|<00><03>}|<00><04>\}}|<02>t<06>|g<01>t<06>||gg<01><01>}|dS)Nr)<08>text<78>Text<78> get_rotation<6F> get_transform<72> get_position<6F>transform_angles<65>np<6E>array)<06>selfZangle<6C>trans<6E>x<>yZ
new_angles<EFBFBD>r<00>:/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/contour.pyr)s   zClabelText.get_rotationN)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrrrrr#src @seZdZdZddddddddd<07>dd <09>Zejd
d d <0C>ed d<0E><00><01>Zejd
dd <0C>edd<0E><00><01>Z ejd
dd <0C>edd<0E><00><01>Z
dd<14>Z dd<16>Z dd<18>Z dd<1A>Zdd<1C>Zdd<1E>Zdd <20>Zd4d!d"<22>Zd#d$<24>Zd%d&<26>Zd'd(<28>Zd)d*<2A>Zd+d,<2C>Zd5d-d.<2E>Zd6d0d1<64>Zd2d3<64>ZdS)7<>ContourLabelerz7Mixin to provide labelling capability to `.ContourSet`.NT<4E>z%1.3fF)<08>fontsize<7A>inline<6E>inline_spacing<6E>fmt<6D>colors<72>use_clabeltext<78>manual<61> rightside_upcGs<>||_||_||_||_t| <09>dkr>|j}
ttt|j<08><01><01>} n<>t| <09>dkr<>t| d<00>} gg} }
x2t |j<05>D]$\} }|| krl| <0B>
| <0A>|
<EFBFBD>
|<0E>qlWt|
<EFBFBD>t| <0C>kr<>t d<03> | |j<05><02><01>nt d<04><01>|
|_| |_t<10><11>|_|j<12>|<01>|j<12><14>}|gt|
<EFBFBD>|_|dk<08>r ||_t<17>|j|j<0F>|_n<tj|t|j<0E>d<06>}ttt|j<0E><01><01>|_tj|t<1A><1E>d<07>|_g|_t<17> |j<02><01>r<>xl|jD]\}}|<00>!||||<03><00>qxWnF|j<02>r<>t"d<08>t"d <09>|<02>s<>t"d
<EFBFBD>t#|<00>}|||<03>n |<00>$||<03>t%<25>&d |j'<27>|_(|j(S) a<>
Label a contour plot.
Call signature::
clabel(cs, [levels,] **kwargs)
Adds labels to line contours in *cs*, where *cs* is a
:class:`~matplotlib.contour.ContourSet` object returned by
``contour()``.
Parameters
----------
cs : `.ContourSet`
The ContourSet to label.
levels : array-like, optional
A list of level values, that should be labeled. The list must be
a subset of ``cs.levels``. If not given, all levels are labeled.
fontsize : string or float, optional
Size in points or relative size e.g., 'smaller', 'x-large'.
See `.Text.set_size` for accepted string values.
colors : color-spec, optional
The label colors:
- If *None*, the color of each label matches the color of
the corresponding contour.
- If one string color, e.g., *colors* = 'r' or *colors* =
'red', all labels will be plotted in this color.
- If a tuple of matplotlib color args (string, float, rgb, etc),
different labels will be plotted in different colors in the order
specified.
inline : bool, optional
If ``True`` the underlying contour is removed where the label is
placed. Default is ``True``.
inline_spacing : float, optional
Space in pixels to leave on each side of label when
placing inline. Defaults to 5.
This spacing will be exact for labels at locations where the
contour is straight, less so for labels on curved contours.
fmt : string or dict, optional
A format string for the label. Default is '%1.3f'
Alternatively, this can be a dictionary matching contour
levels with arbitrary strings to use for each contour level
(i.e., fmt[level]=string), or it can be any callable, such
as a :class:`~matplotlib.ticker.Formatter` instance, that
returns a string when called with a numeric contour level.
manual : bool or iterable, optional
If ``True``, contour labels will be placed manually using
mouse clicks. Click the first button near a contour to
add a label, click the second button (or potentially both
mouse buttons at once) to finish adding labels. The third
button can be used to remove the last label added, but
only if labels are not inline. Alternatively, the keyboard
can be used to select label locations (enter to end label
placement, delete or backspace act like the third mouse button,
and any other key will select a label location).
*manual* can also be an iterable object of x,y tuples.
Contour labels will be created as if mouse is clicked at each
x,y positions.
rightside_up : bool, optional
If ``True``, label rotations will always be plus
or minus 90 degrees from level. Default is ``True``.
use_clabeltext : bool, optional
If ``True``, `.ClabelText` class (instead of `.Text`) is used to
create labels. `ClabelText` recalculates rotation angles
of texts during the drawing time, therefore this can be used if
aspect of the axes changes. Default is ``False``.
Returns
-------
labels
A list of `.Text` instances for the labels.
r<00>z3Specified levels {} don't match available levels {}z-Illegal arguments to clabel, see help(clabel)N)<01>N)<02>cmap<61>normz9Select label locations manually using first mouse button.z.End manual selection with second mouse button.z1Remove last label by clicking third mouse button.z text.Text))<29>labelFmt<6D>_use_clabeltextZ labelManualr!<00>len<65>levels<6C>list<73>range<67>cvalues<65> enumerate<74>append<6E>
ValueError<EFBFBD>format<61> TypeError<6F>labelLevelList<73>labelIndiceList<73> font_managerZFontProperties<65>labelFontPropsZset_sizeZget_size_in_points<74>labelFontSizeList<73> labelMappabler Ztake<6B>labelCValueList<73>mcolors<72>ListedColormap<61>cm<63>ScalarMappable<6C>NoNorm<72>labelXYs<59>iterable<6C>add_label_near<61>printr<00>labels<6C>cbook<6F> silent_list<73>
labelTextsZlabelTextsList)rrrrrrrr r!<00>argsr)<00>indicesZlevlabs<62>i<>levZ font_size_ptsr$rrZblocking_contour_labelerrrr<00>clabel5s\i   


 


  zContourLabeler.clabelz3.0rE)<01> alternativecCs|jS)N)rE)rrrr<00><lambda><3E><00>zContourLabeler.<lambda>r>cCs|jS)N)r>)rrrrrL<00>rM<00> labelCValuescCs|jS)N)rN)rrrrrL<00>rMcCs*t|<01>d|kp(tj|dd<03>d|k<04><03>S)z5Return *False* if contours are too short for a label.<2E>
r)<01>axisg333333<33>?)r(r Zptp<74>any)r<00> linecontour<75>
labelwidthrrr<00> print_label<65>szContourLabeler.print_labelcs(d|d<00>t<00><00><01>fdd<04>|jD<00><01>S)z7Return *True* if a label is already near this location.g333333<33>?<3F>c3s2|]*}<01>|dd<00>|dd<00>kVqdS)rrUr"Nr)<02>.0<EFBFBD>loc)<03>threshrrrr<00> <genexpr><3E>sz+ContourLabeler.too_close.<locals>.<genexpr>)rQr>)rrr<00>lwr)rXrrr<00> too_close<73>s zContourLabeler.too_closec Cs<>t|d<00>}t<01>|<01>}x>|D]6}||||||} }
|<00>| |
|<05>rJq| |
|fSW|d}||||||} }
| |
|fS)a<>
Return x, y, and the index of a label location.
Labels are plotted at a location with the smallest
deviation of the contour from a straight line
unless there is another label nearby, in which case
the next best place on the contour is picked up.
If all such candidates are rejected, the beginning
of the contour is chosen.
rUr)<04>intr Zargsortr[) rZ distances<65>XX<58>YY<59>ysizerZZhysizeZadist<73>indrrrrr<00>get_label_coords<64>s 

 zContourLabeler.get_label_coordscCs<>t|t<01>s|<00>||<02>}t<03><04><00>|<01>\}}|dkrZt|d<02>sDt<07><08>|_ |j <09>
||<03>\}}}nL|r<>t|d<03>stt <0B> d<04>|_ |j j|d|jd<06>\}}|<07><10>}nt|<01>|d}|S)z:
Return the width of the label in points.
ZTeX<65> _TeX_manager<65>_mathtext_parserZbitmap<61>H)<02>dpi<70>propg333333<33>?)<12>
isinstance<EFBFBD>str<74>get_textrrZ_preprocess_math<74>hasattr<74>
texmanagerZ
TexManagerrbZget_text_width_height_descent<6E>mathtextZMathTextParserrc<00>parser5Z get_widthr()rrIr<00>fsizeZismathrZ<00>_<>imgrrr<00>get_label_widths 
 


 

zContourLabeler.get_label_widthcCs2|<01>|<02>|<01>|<03>|<01>|j<03>|<01>|jj<06>dS)z1Set the label properties - color, fontsize, text.N)Zset_text<78> set_colorZset_fontpropertiesr5Z set_clip_box<6F>axZbbox)r<00>labelr<00>colorrrr<00>set_label_propss

 zContourLabeler.set_label_propscCs@t|t<01>r|St|t<02>r$|<02>|d<01>St|<02>r4||<01>S||SdS)zGet the text of the label.z%1.3fN)rgrh<00>dict<63>get<65>callable)rrIrrrrri#s

 zContourLabeler.get_textc Csjt|<01>}|dkr$tt<02>||<00><01>}nd}|dkr6|}nt|<02>}t<02>|dd<02>df||f<02>}t<02>|dd<02>df||f<02>}|dd<02>dd<01>f}|dd<02>dd<02>f} |dd<02>dd<01>f}
|dd<02>dd<02>f} ||| |
|
|| |} t<02>| |
| |<00>} tjddd<06><02>tjt<02>| <0C>| dd<07>}WdQRX|<00> |||||<02>\}}}dd <09>|D<00>}|<12>
||f<02>}|||fS)
zX
Find good place to draw a label (relatively flat part of the contour).
r"Nr<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ignore)<02>divide<64>invalid)rPcSsg|] }t|<01><01>qSr)<01>tuple)rV<00>lrrr<00>
<listcomp>Nsz/ContourLabeler.locate_label.<locals>.<listcomp>) r(r\r <00>ceil<69>resize<7A>hypotZerrstate<74>sum<75>absra<00>index)rrRrSZnsizeZxsizer_r]r^ZyfirstZylastZxfirstZxlast<73>s<>L<>distrrr`<00>lcZdindrrr<00> locate_label/s* "zContourLabeler.locate_labelc s<>|dkr g}|d}t|<01>}|rptj||d<03>|d|d<00>f}t|<04>rltj||d<03>|d|d<00>f}d}tj|jdtd<06><02>tj|dd<07>}t<01>t<01> |dd<01>df|dd<01>df<00><02><01>dd<01><<00><01>|<00>t<01>
| |g<02><01>|r<>t<01>
<EFBFBD>ddg<02><01>n
t<01> <0B><02><01><00><00><01>fdd <09>|j D<00>\\}\} t<01> t<01>| |<08><02>}
|j<0F>rL|
d
d d
}
g} t|<04><01>r<><72><00>t<01>
| |g<02><00>tj<10><02>t<01>t<03><01><01>ddd <0C>} t<01>| d<00><01>t<14>t<01>| d<00><01>t<14>g} | ddk<03><01>fd d<0E>|j D<00>} | ddk<03>r<00><01>fdd<0E>|j D<00>}|<07>rFtdd <09>| D<00><01><01>r<>| <0B>t<01>||| d| dd<00>| g<03><01>n`| ddk<03>rx| <0B>t<01>|d| dd<00>| g<02><01>| ddk<03>r<>| <0B>t<01>||| dd<01>g<02><01>|
| fS)a
This function calculates the appropriate label rotation given
the linecontour coordinates in screen units, the index of the
label location and the label width.
It will also break contour and calculate inlining if *lc* is
not empty (lc defaults to the empty list if None). *spacing*
is the space around the label in pixels to leave empty.
Do both of these tasks at once to avoid calculating path lengths
multiple times, which is relatively costly.
The method used here involves calculating the path length
along the contour in pixel coordinates and then looking
approximately label width / 2 away from central point to
determine rotation and then to break contour if desired.
Ng@rzr"r)<01>dtype)rPc3s&|]}t<00>t<00><02><00><00>|<01><03>VqdS)N)r <00>diff<66>interp)rVZslc_col)<03>dp<64>pl<70>xirrrY<00>sz;ContourLabeler.calc_label_rot_and_inline.<locals>.<genexpr><3E>Z<00><>)<02>left<66>rightcsg|]}t<00><01>d<00>|<01><03>qS)r)r r<>)rV<00>lc_col)r<>r<>rrr<><00>sz<ContourLabeler.calc_label_rot_and_inline.<locals>.<listcomp>csg|]}t<00><01>d<00>|<01><03>qS)r")r r<>)rVr<>)r<>r<>rrr<><00>scss|]}|dkVqdS)rzNr)rVrHrrrrY<00>s)<19>_is_closed_polygonr <00>r_r(<00>zeros<6F>shape<70>floatr<74>Zcumsumr<6D>r Z
zeros_like<EFBFBD>TZrad2degZarctan2r!r<><00>arange<67>floor<6F>astyper\r<><00>allr.Z row_stack)r<00>slcr`rZr<><00>spacingZhlw<6C>closed<65>dx<64>dy<64>rotation<6F>nlc<6C>IZxy1Zxy2r)r<>r<>r<>r<00>calc_label_rot_and_inlineSsN""2 

(,$ z(ContourLabeler.calc_label_rot_and_inlinecCs2|jj<01><02><00>||f<02>\}}tj|||ddd<02>}|S)N<>center)r<><00>horizontalalignment<6E>verticalalignment)rs<00> transData<74>inverted<65>transform_pointrr)rrrr<>r<>r<><00>trrr<00>_get_label_text<78>s

zContourLabeler._get_label_textc CsX|jj<01><02>}|<04>||f<02>\}}|<04>t<05>|g<01>t<05>||gg<01><01>}t|||dddd<03>}|S)Nrr<>)r<>r<>r<>)rsr<>r<>r<>r r r r) rrrr<>Z transDataInvr<76>r<>Z drotationr<6E>rrr<00>_get_label_clabeltext<78>s  z$ContourLabeler._get_label_clabeltextcCsf|jj||jd<01>}|<00>||j<04>}|<00>|||<06>|j<06>|<01>|j<08>|<05>|j <09>||f<02>|j
<EFBFBD> |<01>dS)N)<01>alpha) r7<00>to_rgbar<61>rir&rvrEr.rNr>rsZ
add_artist)rr<>rrrI<00>cvalueruZ_textrrr<00>
_add_label<EFBFBD>s  zContourLabeler._add_labelcCs$|<00>|||<03>}|<00>|||||<05>dS)zO
Add contour label using :class:`~matplotlib.text.Text` class.
N)r<>r<>)rrrr<>rIr<>r<>rrr<00> add_label<65>szContourLabeler.add_labelcCs$|<00>|||<03>}|<00>|||||<05>dS)zD
Add contour label using :class:`ClabelText` class.
N)r<>r<>)rrrr<>rIr<>r<>rrr<00>add_label_clabeltext<78>s z#ContourLabeler.add_label_clabeltextcCs<>|dkr|jj}|r&|<05>||f<02>\}}|<00>|||j<04>dd<02>\}}}} }
|j|<00><06>} | |} | j} |jj<01><08><00>| |
g<02>}t <09>
|| |<00>s<>t j | d|<08>t <09> |<0E>ddd<01>f| |d<01>f} t <0A>| <0A>| |<|j<04>|<06>}|j|<00><06>} | |j} |jj<01>| <0A>}|<00>|j||j|j|<00>}||jjjd9}|<03>r6| }nd}|<00>|||||<04>\}}|<00>| |
||j||j|<00>|<03>r<>| <0B>|<07>x,|D]$}t|<15>dk<04>r<>| <0B>t <0A>|<15><01><00>q<>WdS)a)
Add a label near the point (x, y). If transform is None
(default), (x, y) is in data coordinates; if transform is
False, (x, y) is in display coordinates; otherwise, the
specified transform will be used to translate (x, y) into
display coordinates.
Parameters
----------
x, y : float
The approximate location of the label.
inline : bool, optional, default: True
If *True* remove the segment of the contour beneath the label.
inline_spacing : int, optional, default: 5
Space in pixels to leave on each side of label when placing
inline. This spacing will be exact for labels at locations where
the contour is straight, less so for labels on curved contours.
NrgR@r")rsr<>r<><00>find_nearest_contourr3<00> collections<6E> get_paths<68>verticesr<73>r Zallcloser<65>r <00>mpath<74>Pathr<68><00> transformrqr2r&r6<00>figurerer<>r<>r8<00>popr(r.)rrrrrr<><00>conmin<69>segmin<69>imin<69>xmin<69>ymin<69>pathsZ active_pathr<68><00>xcminZlminr<6E>rZ<00>lcargr<67>r<><00>nrrrr@<00>sB2 
 
 

zContourLabeler.add_label_nearrzcCs$|j<00>|<01>|j<02>|<01>}|<02><03>dS)z>Defaults to removing last label, but any index can be suppliedN)rNr<>rE<00>remove)rr<>r<>rrr<00> pop_label=s  zContourLabeler.pop_labelc Cs<>|jr|j}n|j}<03>xft|j|j|j|j<07>D<00>]J\}}}}|j|}|<08> <09>} |<00>
||j |<06>}
|
|j j jd9}
g} |<08><0F>} x<>t| <0C>D]<5D>\} }|j}| <09>|<0F>}t|<0F>r<>tj||dd<03>dd<00>ff}n|}|<00>||
<EFBFBD><02>rT|<00>||
<EFBFBD>\}}}|r<>|}nd}|<00>|||
||<02>\}}||||||<07>|<01>r^x8|D]$}t|<18>dk<04>r*| <0B>t<1B>|<18><01><00>q*Wq<>| <0B>|<0E>q<>W|r.| dd<00>=| <0C>| <0B>q.WdS)NgR@r"rU)r'r<>r<><00>zipr3r2r6r8r<>r rqr&rsr<>rer<>r-r<>r<>r<>r r<>rTr<>r<>r(r.r<>r<><00>extend)rrrr<><00>iconrIrnr<><00>conrrZZ additionsr<73><00>segNum<75>linepathr<68>Zslc0r<30>rrr`r<>r<><00>newr<77>rrrrBCsF

 


zContourLabeler.labels)Nr)TrN)rz)rrrrrJrC<00>
deprecated<EFBFBD>propertyZclZcl_xyZ
cl_cvaluesrTr[rarqrvrir<>r<>r<>r<>r<>r<>r<>r@r<>rBrrrrr2s8"    $
[  
X
rcCs<>t<00>||k<02>r(t<00>||d<00>}||fS||}||}t<00>||<04>t<00>||<04>}|dkr\d}|dkrhd}|||}t<00>||d<00>}||fS)zBFind the closest point to p0 on line segment connecting p1 and p2.rUrr")r r<>r<><00>dot)<08>p1<70>p2Zp0<70>dZd21Zd01Zproj<6F>pcrrr<00>_find_closest_point_on_leg<65>s r<>cCst<00>|d|dk<02>S)z<>
Return whether first and last object in a sequence are the same. These are
presumably coordinates on a polygonal curve, in which case this function
tests if that curve is closed.
rrz)r r<>)<01>Xrrrr<><00>sr<>c Cs<>t<00>||ddd<01>fdd<03>}t<00>|<02>}tj}d}d}t|<00>}g}|dksP|rj|<08>|dt|<00>|f<02>|t|<00>dks~|r<>|<08>||dt|<00>f<02>x@|D]8} t|| d|| d|<01>\}
} |
|kr<>|
}| }| }q<>W|||fS)zj
Parameters
----------
lc : coordinates of vertices
point : coordinates of test point
NrUr")NNr)r r<>Zargmin<69>infr<66>r.r(r<>) r<><00>pointZdsr<73><00>dminr<6E>Zlegminr<6E>Zlegs<67>legr<67><00>xcrrr<00>_find_closest_point_on_path<74>s$ 
 
 r<>c@s<>eZdZdZddddddddddddddd<05>dd<07>Zdd <09>Zd
d <0B>Zd efd d<0E>Zdd<10>Z dd<12>Z
dd<14>Z dd<16>Z dd<18>Z dd<1A>Zdd<1C>Zdd<1E>Zdd <20>Zd!d"<22>Zd#d$<24>Zd%d&<26>Zd'd(<28>Zd,d*d+<2B>ZdS)-<2D>
ContourSeta
Store a set of contour lines or filled regions.
User-callable method: `~.axes.Axes.clabel`
Parameters
----------
ax : `~.axes.Axes`
levels : [level0, level1, ..., leveln]
A list of floating point numbers indicating the contour
levels.
allsegs : [level0segs, level1segs, ...]
List of all the polygon segments for all the *levels*.
For contour lines ``len(allsegs) == len(levels)``, and for
filled contour regions ``len(allsegs) = len(levels)-1``. The lists
should look like::
level0segs = [polygon0, polygon1, ...]
polygon0 = array_like [[x0,y0], [x1,y1], ...]
allkinds : ``None`` or [level0kinds, level1kinds, ...]
Optional list of all the polygon vertex kinds (code types), as
described and used in Path. This is used to allow multiply-
connected paths such as holes within filled polygons.
If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
should look like::
level0kinds = [polygon0kinds, ...]
polygon0kinds = [vertexcode0, vertexcode1, ...]
If *allkinds* is not ``None``, usually all polygons for a
particular contour level are grouped together so that
``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.
**kwargs
Keyword arguments are as described in the docstring of
`~.axes.Axes.contour`.
Attributes
----------
ax
The axes object in which the contours are drawn.
collections
A silent_list of LineCollections or PolyCollections.
levels
Contour levels.
layers
Same as levels for line contours; half-way between
levels for filled contours. See :meth:`_process_colors`.
NFZneither)r)<00>filled<65>
linewidths<EFBFBD>
linestylesr<EFBFBD><00>origin<69>extentr$rr%<00>vmin<69>vmaxr<78><00> antialiasedc(
Os<>||_||_||_||_||_|<11>ddg<01>|_||_||_||_ |
|_
||_ ||_ |j dkrh|jrhd|_ |<11>dd<05>|_ |<11>dd<02>|_t| tj<11>s<>t|jtj<13>r<>d|_| dkr<>t<10><11>} nd|_tjddd d
g|d <0B>|j dk r<>t|j <09>d kr<>td <0A><01>|j
dk <09>r| dk <09>rtd<0E><01>|jd
k<02>r(tjd|_|<11>dd<02>|_|j||<11>}|<00><1D>|j
dk <09>rt|j<01>}|j<02>rp|d8}d}|j dk}|j dk}d}|t|<14>t|<15>}t|j
<EFBFBD>|k<02>r<>|<14>s<>|<15>r<>d}|<14>r<>d}tj|j
|d<02>|d<14>} |<16>r|<14>r<>| <09> |j
d<00>|<15>r| <09>!|j
d<00>|j<02>r*t<15>"d<16>|_#n t<15>"d<17>|_#g|_$g|_%d| i}| dk <09>r\| |d<t&j'j(|f|<18>| dk <09>r~| |j)_*| dk <09>r<>| |j)_+|<00>,<2C>|<00>-<2D>\|_.|_/|j<02>rl|jdk <09>r<>t<15>0d<1A>|<00>1<EFBFBD>\}}|j/dk<08>r<>dgt|j.<2E>|_/|<11>dd<11>}xlt2|||j.|j/<2F>D]V\}}}}|<00>3||<1F>} t4j5| |j fd|j|<00>6<EFBFBD>|d<1D>}!|jj7|!dd<1E>|j#<23>8|!<21><00>qWn<>|<00>9<EFBFBD>}"|"|_:|<00>;<3B>}#|j }$|$dk <09>r<>|j f}$|<11>dd<1F>}xjt2|j|"|#|j.<2E>D]T\}}%}&}t4j<||$|%|&g|j|<00>6<EFBFBD>|d <20>}!|!<21>=d!<21>|jj7|!dd<1E>|j#<23>8|!<21><00>q<>WxP|j#D]F}!|j>d|j?dg|!j@jAdd<02><|j>d|j?dg|!j@jBdd<02><<00>qW|j<00>C|j>|j?g<02>|jjDdd"<22>|<00>E<EFBFBD>|<11>r<>d#<23>FtGtH|<11><02>}'t<15>0d$|'<00>dS)%a<>
Draw contour lines or filled regions, depending on
whether keyword arg *filled* is ``False`` (default) or ``True``.
Call signature::
ContourSet(ax, levels, allsegs, [allkinds], **kwargs)
Parameters
----------
ax : `~.axes.Axes`
The `~.axes.Axes` object to draw on.
levels : [level0, level1, ..., leveln]
A list of floating point numbers indicating the contour
levels.
allsegs : [level0segs, level1segs, ...]
List of all the polygon segments for all the *levels*.
For contour lines ``len(allsegs) == len(levels)``, and for
filled contour regions ``len(allsegs) = len(levels)-1``. The lists
should look like::
level0segs = [polygon0, polygon1, ...]
polygon0 = array_like [[x0,y0], [x1,y1], ...]
allkinds : [level0kinds, level1kinds, ...], optional
Optional list of all the polygon vertex kinds (code types), as
described and used in Path. This is used to allow multiply-
connected paths such as holes within filled polygons.
If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
should look like::
level0kinds = [polygon0kinds, ...]
polygon0kinds = [vertexcode0, vertexcode1, ...]
If *allkinds* is not ``None``, usually all polygons for a
particular contour level are grouped together so that
``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.
**kwargs
Keyword arguments are as described in the docstring of
`~axes.Axes.contour`.
<20>hatchesNF<4E>nchunkr<00>locatorT<72>lower<65>upper<65>image)r<><00>z7If given, *extent* must be '[ *None* | (x0,x1,y0,y1) ]'z"Either colors or cmap must be Nonez image.originr<6E>r")<02>min<69>both)<02>maxr<78>)r#rzzmcoll.PathCollectionzmcoll.LineCollectionr$r%z!linewidths is ignored by contourf<72>zorder<65>none)<05> antialiasedsZ
edgecolorsr<EFBFBD>r<>r<>)ZautolimrU)r<>r<>r<>r<>r<>r<>Z
_nolegend_)Ztightz, z/The following kwargs were not used by contour: )Irsr)r<>r<>r<>r<>r<>r<>r<>r<>rr<>r<>r<>r<>rgr9ZLogNorm<72>ticker<65>
LogLocator<EFBFBD>logscalerCZ_check_in_listr(r/<00>mpl<70>rcParams<6D>
_transform<EFBFBD> _process_args<67>_process_levelsr\r:Z set_underZset_overrDr<>rErNr;r<<00>__init__r%r<>r<><00>_process_colors<72>_get_allsegs_and_allkinds<64>allsegs<67>allkinds<64>_warn_external<61>_get_lowers_and_uppersr<73><00> _make_paths<68>mcollZPathCollectionr Zadd_collectionr.<00>_process_linewidths<68> tlinewidths<68>_process_linestyles<65>LineCollectionZ set_label<65>_mins<6E>_maxsZ sticky_edgesrrZupdate_datalimZautoscale_view<65>changed<65>join<69>map<61>repr)(rrsr)r<>r<>r<>r<>r<>r<>r$rr%r<>r<>r<>r<>rF<00>kwargsZncolors<72>i0Z
extend_minZ
extend_maxZuse_set_under_overZ total_levels<6C>kw<6B>lowers<72>uppersr<73><00>level<65> level_upper<65>segs<67>kindsr<73><00>colr <00> tlinestylesZaa<61>widthZlstyler<65>rrrr<00>s<>2 
    


 


 
    
 
  &zContourSet.__init__cCsF|jdkr|jj|_n*t|jtj<05>s@t|jd<02>r@|j<00>|j<01>|_|jS)zp
Return the :class:`~matplotlib.transforms.Transform`
instance used by this ContourSet.
N<>_as_mpl_transform)r<>rsr<>rg<00> mtransformsZ Transformrjr )rrrrr <00>s 
  zContourSet.get_transformcCs|j<00><01>}d|d<|S)N<>_contour_generator)<02>__dict__<5F>copy)r<00>staterrr<00> __getstate__<5F>s
zContourSet.__getstate__rc CsNg}g}|jr<>|<00><01>\}}t|j<03>}x<>tt|j||<06><03>D]<5D>\}\} }
} tjddd| <09><08>d| <09> <09>| <09>
<EFBFBD>d<04>} |<03> | <0C>||
<EFBFBD>}
|| <0B>} |dkr<>|j dkr<>|<04> d||
f<00>q8||dkr<>|j dkr<>|<04> d|| f<00>q8|<04> d |
|| f<00>q8WnVxTt|j|j <0A>D]B\} } t<0E>d
<EFBFBD>} | <0C>| <09>|<03> | <0C>|| <0A>} |<04> d || f<00><00>qW||fS) a<>
Return a list of artists and labels suitable for passing through
to :func:`plt.legend` which represent this ContourSet.
The labels have the form "0 < x <= 1" stating the data ranges which
the artists represent.
Parameters
----------
variable_name : str
The string used inside the inequality used on the labels.
str_format : function: float -> str
Function used to format the numbers in the labels.
Returns
-------
artists : List[`.Artist`]
A list of the artists.
labels : List[str]
A list of the labels.
)rrr"r)Z facecolor<6F>hatchr<68>)r<>r<>z $%s \leq %s$)r<>r<>z $%s > %s$z$%s < %s \leq %s$Nz $%s = %s$)r<>rr(r<>r-r<><00>mpatchesZ RectangleZ get_facecolorZ get_hatch<63> get_alphar.r<>r)r r Z update_from)rZ variable_nameZ
str_formatZartistsrBrrZn_levelsrH<00>
collectionr<EFBFBD>r<><00>patchrrrr<00>legend_elements<74>s> 

 
  


zContourSet.legend_elementscOs<>|d|_|d|_t|<01>dkr(|dp*d|_t<04>|j<00>|_t<04>|j<00>|_|j rrt|j<01>t|j<00>dkr<>t
d<05><01>nt|j<01>t|j<00>kr<>t
d<06><01>|jdk r<>t|j<03>t|j<01>kr<>t
d<07><01>dd <09>|jD<00>}tj |dd
<EFBFBD>}|jdd
<EFBFBD>|_ |jdd
<EFBFBD>|_ |S) z<>
Process *args* and *kwargs*; override in derived classes.
Must set self.levels, self.zmin and self.zmax, and update axes
limits.
rr"rUNz-must be one less number of segments as levelsz)must be same number of segments as levelsz(allkinds has different length to allsegscSsg|]}|D]}|<02>q qSrr)rV<00>segr<67>rrrr<>=sz,ContourSet._process_args.<locals>.<listcomp>)rP)r)rr(rr r<><00>zmaxr<78><00>zminr<6E>r/Z concatenaterr)rrFrZ flatseglistZpointsrrrr<>!s$



zContourSet._process_argscCs |j|jfS)zv
Override in derived classes to create and return allsegs and allkinds.
allkinds can be None.
)rr)rrrrrDsz$ContourSet._get_allsegs_and_allkindscCs`|jdd<02>}|j|dkrJ|<01><02>}|jr:d|j|d<n|dd8<|jdd<01>}||fS)z=
Return (lowers,uppers) for filled contours.
Nrzrg<>G<EFBFBD>z<14><>?r")<04>_levelsr/r$r<>)rrrrrrrKsz!ContourSet._get_lowers_and_upperscCs.|dk rdd<02>t||<02>D<00>Sdd<02>|D<00>SdS)NcSsg|]\}}tj||d<00><02>qS))<01>codes)r<>r<>)rVr-<00>kindrrrr<>\sz*ContourSet._make_paths.<locals>.<listcomp>cSsg|]}t<00>|<01><01>qSr)r<>r<>)rVr-rrrr<>_s)r<>)rrrrrrrZszContourSet._make_pathscCs<>dd<02>|j|j|jd<03>D<00>}||_|jt|<01>}xBt|||j<07>D]0\}}}|jrf|<05> |<03>|<05>
|<04>q@|<05> |<03>q@Wx8t|j |j <0A>D]&\}}|<06>|j<02>|<06> |j<0F>|<07><01>q<>Wtj<11>|<00>dS)NcSsg|]}t|<01>f<01>qSr)r~)rVZrgbarrrr<>bsz&ContourSet.changed.<locals>.<listcomp>)r<>)r<>r,r<><00>tcolorsr<73>r(r<>r<>r<>Z set_facecolorZ set_hatchrrrErN<00> set_alphar7r;r<r)rr3r<>rur'r*rtZcvrrrras
  zContourSet.changedcCs |jdkr0|jrt<02><03>|_ntj|ddd<03>|_|j<00>|j|j<07>}y|jjrP|SWnt k
rfYnXt
<EFBFBD> ||jk<00>d}t |<03>r<>|dnd}t
<EFBFBD> ||jk<04>d}t |<05>r<>|ddnt |<02>}|j dkr<>|d7}|j dkr<>|d8}||dk<00>rdt |<02>}}|||<06>S) a,
Select contour levels to span the data.
The target number of levels, *N*, is used only when the
scale is not log and default locator is used.
We need two more levels for filled contours than for
line contours, because for the latter we need to specify
the lower and upper boundary of each range. For example,
a single contour boundary, say at z = 0, requires only
one contour line, but two filled regions, and therefore
three levels to provide boundaries for both regions.
Nr")Z min_n_ticksrrz)r<>r<>)r<>r<><00>)r<>r<>r<>r<>Z MaxNLocatorZ tick_valuesr/r.Z
_symmetric<EFBFBD>AttributeErrorr Znonzeror(r<>)rr#rIZunderrZover<65>i1rrr<00>_autolevts*
 

zContourSet._autolevcCs<>|jdkr&t|<02>dkrd}q,|d}n|j}t|t<03>rD|<00>|<03>|_nt<05>|<03><01>tj<08>|_|j s<>|j|j
k|j|j k@}|j|}t|<05>dkr<>|j
g|_t <0C> d<04>|j r<>t|j<00>dkr<>td<06><01>t|j<00>dkr<>t<05>t<05>|j<00><01>dkr<>td <09><01>dS)
zH
Determine the contour levels and store in self.levels.
Nr<00>z3No contour levels were found within the data range.rUz*Filled contours require at least 2 levels.r"gz!Contour levels must be increasing)r)r(rgrr8r <00>asarrayr<79><00>float64r<34>r/r.rCrr/r<>r<>)r<00>zrFZ
levels_argZinsideZ levels_inrrr<00>_contour_level_args<67>s&
 


 
$zContourSet._contour_level_argscCs<>t|j<01>|_|jrd\}}nd\}}|jdkr<|j<02>d|<01>|jdkrR|j<02>|<02>t<07>|j<02>|_|j sr|j|_
dS|jr<>t<07> |jdd<07><00>t<07> |jdd<06><00>|_
n"d |jdd<07>|jdd<06>|_
dS)
a&
Assign values to :attr:`layers` based on :attr:`levels`,
adding extended layers as needed if contours are filled.
For line contours, layers simply coincide with levels;
a line is a thin layer. No extended levels are needed
with line contours.
)gL<67><4C>]?<3F> gRy<52><79>X<EFBFBD>s)gRy<52><79>X<EFBFBD><58>gRy<52><79>X<EFBFBD>s)r<>r<>r)r<>r<>Nrzr"g<00>?) r*r)r0r<>r<><00>insertr.r r:r<><00>layers<72>sqrt)rr<>r<>rrrr<00>s 


 zContourSet._process_levelscCs<>|jj|_|jdk rvdt|j<04>}}|jrV|d8}|jdkrD|d8}|jdkrV|d7}tt||<02><02>|_ |<00>
t <0B> <0C><00>n|j |_ |<00>|j<04>|<00><0F>|jdkr<>d|j_dS)a
Color argument processing for contouring.
Note that we base the color mapping on the contour levels
and layers, not on the actual range of the Z values. This
means we don't have to worry about bad values in Z, and we
always have the full dynamic range available for the selected
levels.
The color is based on the midpoint of the layer, except for
extended end layers. By default, the norm vmin and vmax
are the extreme values of the non-extended levels. Hence,
the layer color extremes are not the extreme values of
the colormap itself, but approach those values as the number
of levels increases. An advantage of this scheme is that
line contours, when added to filled contours, take on
colors that are consistent with those of the filled regions;
for example, a contour line on the boundary between two
regions will have a color intermediate between those
of the regions.
Nrr")r<>r<>)r<>r<>)r<>r<>r<>F)r$<00>
monochromerr(r)r<>r<>r*r+r,Zset_normr9r=r?Z set_arrayZautoscale_Noner%Zclip)rrr7rrrr<00>s 



 
zContourSet._process_colorscCs<>|j}t|j<02>}|dkr,tjdfg|}nnt<05>|<01>sB|g|}nJt|<01>}t|<01>|krttt<05> |t|<01><00><01>}||}t|<01>|kr<>|d|<02>}dd<03>|D<00>}|S)Nzlines.linewidthcSsg|]
}|f<01>qSrr)rV<00>wrrrr<>sz2ContourSet._process_linewidths.<locals>.<listcomp>)
r<EFBFBD>r(r)r<>r<>r r?r*r\r<>)rr<><00>Nlevr <00>nrepsrrrr
s

    zContourSet._process_linewidthsc Cs<>|j}t|j<02>}|dkrndg|}|jr<>tjd}|j|j d}x<>t|j<02>D]\}}||krP|||<qPWntt |t
<EFBFBD>r<>|g|}n^t <0B> |<01>r<>t |<01>}t|<03>|kr<>tt <0B>|t|<01><00><01>}||}t|<03>|kr<>|d|<02>}ntd<04><01>|S)NZsolidzcontour.negative_linestylegV瞯<03><z&Unrecognized type for linestyles kwarg)r<>r(r)rAr<>r<>r.r/r-rgrhr r?r*r\r<>r/) rr<>rCrZneg_lsZepsrHrIrDrrrr !s*



 
  zContourSet._process_linestylescCs|jS)z5returns alpha to be applied to all ContourSet artists)r<>)rrrrr):szContourSet.get_alphacCs||_|<00><01>dS)z<>
Set the alpha blending value for all ContourSet artists.
*alpha* must be between 0 (transparent) and 1 (opaque).
N)r<>r)rr<>rrrr4>szContourSet.set_alphaTcCs<>|dkrttt|j<03><01><01>}tj}d}d}d}d} t<04>||g<02>}
x<EFBFBD>|D]<5D>} |j| } | <0C><08>} | <0C> <09>}xdt
|<0E>D]X\}}|j }|r<>| <0A> |<11>}t ||
<EFBFBD>\}}}||krl|}| }|}|d}|d}|d} qlWqDW||||| |fS)a<>
Finds contour that is closest to a point. Defaults to
measuring distance in pixels (screen space - useful for manual
contour labeling), but this can be controlled via a keyword
argument.
Returns a tuple containing the contour, segment, index of
segment, x & y of segment point and distance to minimum point.
Optional keyword arguments:
*indices*:
Indexes of contour levels to consider when looking for
nearest point. Defaults to using all levels.
*pixel*:
If *True*, measure distance in pixel space, if not, measure
distance in axes space. Defaults to *True*.
Nr"r)r*r+r(r)r r<>r r<>r r<>r-r<>r<>r<>)rrrrGZpixelr<6C>r<>r<>r<>r<>r<>r<>r<>rr<>r<>r<>r<>r<>r<>r<>r<>rrrr<>Fs2


zContourSet.find_nearest_contour)NT)rrrrrr r&rhr,r<>rrrrr8r=rrr
r r)r4r<>rrrrr<><00>s.7
I C#+%-r<>c@s<eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd Z d S)<0E>QuadContourSeta<74>
Create and store a set of contour lines or filled regions.
User-callable method: `~axes.Axes.clabel`
Attributes
----------
ax
The axes object in which the contours are drawn.
collections
A silent_list of LineCollections or PolyCollections.
levels
Contour levels.
layers
Same as levels for line contours; half-way between
levels for filled contours. See :meth:`_process_colors` method.
c Os<>t|dt<01>rn|jdkr$|dj|_|dj|_|dj|_|dj|_|dj}|dj|_|dj|_<08>nddl m
}|<02> dd<02>|_|jdkr<>t j d|_|<00>||<02>\}}}t<0F>|<07>}|tjks<>|<08><12>s<>d}|<04>|||<07><14>||j|j<15>}|<00><16>} | |jjk<03>rPt| <09>|jj<18><01><01>rP| |jj}
t<1A>|j|jg<02>j} |
<EFBFBD>| <0B>} | d}| d}t<0F>|<05>t<0F>|<06>g|_t<0F> |<05>t<0F> |<06>g|_||_|S)z*
Process args and kwargs.
rNZ corner_maskzcontour.corner_mask).r).r")!rgrEr)r/r.Z _corner_maskr"rrZmatplotlib._contour<75>_contourr<72>r<>r<><00> _contour_argsrZgetmaskZnomaskrQZQuadContourGeneratorr<72>r<>r rsr<>Zcontains_branch_seperatelyr ZvstackZflatr<74>r<>r<>r<>) rrFrZcontour_generatorrFrrr<Z_maskr<6B>Z trans_to_dataZptsZtransformed_ptsrrrr<><00>s>
    
  
 
 
zQuadContourSet._process_argsc Cs<>g}|jrZ|<00><01>\}}g}xht||<03>D].\}}|j<03>||<06>\}}|<01>|<07>|<04>|<08>q&Wn*d}x$|jD]}|j<03>|<05>}|<01>|<07>qfW||fS)z7Compute ``allsegs`` and ``allkinds`` using C extension.N)r<>rr<>r"Zcreate_filled_contourr.r)Zcreate_contour) rrrrrrrr<>rrrrr<00>s  
  z(QuadContourSet._get_allsegs_and_allkindscCs|jr d}nd}t|<01>}|dkrPtj|dtjd<05>}|<00>|<05>\}}|dd<00>}n@|dkr<>|<00>|dd<08>|<02>\}}}|dd<00>}ntd ||f<00><01>tj |d
d <0B>}t
|<05> <0B><00>|_ t
|<05> <0A><00>|_|jr<>|jdkr<>t<02>|dk|<05>}t<11>d <0C>t
|<05> <0A><00>|_|<00>||<01>|||fS) NZcontourfZcontourrUr)r<>r"r<>r5z&Too many arguments to %s; see help(%s)F)r$z,Log scale: values of z <= 0 have been masked)r<>r(rr:r r;<00>_initialize_x_y<5F>
_check_xyzr1Zmasked_invalidr<64>r<>r.r<>r/r<>Z masked_whererCrr=)rrFr<00>fnZNargsr<rrrrrrG<00>s, 
 zQuadContourSet._contour_argsc
Csz|dd<02>\}}|jj|||d<03>}|j<00>|<03>}|j<00>|<04>}tj|tjd<04>}tj|tjd<04>}tj|dtjd<04>}|jdkr<>t d<05><01>n0|j
ddks<>|j
ddkr<>t d<08><01>n
|j
\}}|j|jkr<>t d <09><01>|jdk<02>r|j
\}|j
\} ||kr<>t d
<EFBFBD><01>| |k<03>rt d <0B><01>t<04> ||<04>\}}nZ|jdk<02>rh|j
|j
k<03>rDt d <0C> |j
|j
<EFBFBD><02><01>|j
|j
k<03>rpt d <0A> |j
|j
<EFBFBD><02><01>nt d<0E><01>|||fS)a 
For functions like contour, check that the dimensions
of the input arrays match; if x and y are 1D, convert
them to 2D using meshgrid.
Possible change: I think we should make and use an ArgumentError
Exception class (here and elsewhere).
NrU)ZxdataZydatar)r<>zInput z must be a 2D array.rr"z%Input z must be at least a 2x2 array.z-Number of dimensions of x and y should match.z+Length of x must be number of columns in z.z(Length of y must be number of rows in z.z>Shape of x does not match that of z: found {0} instead of {1}.z>Shape of y does not match that of z: found {0} instead of {1}.z Inputs x and y must be 1D or 2D.) rsZ_process_unit_infoZconvert_xunitsZconvert_yunitsr r:r;r<00>ndimr1r<><00>meshgridr0)
rrFrrrr<<00>Ny<4E>NxZnx<6E>nyrrrrI<00>s>   



  
 zQuadContourSet._check_xyzc Cs>|jdkrtd<02><01>n0|jddks0|jddkr:td<05><01>n
|j\}}|jdkr<>|jdkrpt<05>t<05>|<03>t<05>|<02><01>S|j\}}}}t<05>|||<03>}t<05>|||<02>} t<05>|| <09>S|jdkr<>d|d|f\}}}}n|j\}}}}|||}
|||} |t<05>|<03>d|
}|t<05>|<02>d| } |jdk<02>r2| ddd <09>} t<05>|| <09>S)
a
Return X, Y arrays such that contour(Z) will match imshow(Z)
if origin is not None.
The center of pixel Z[i,j] depends on origin:
if origin is None, x = j, y = i;
if origin is 'lower', x = j + 0.5, y = i + 0.5;
if origin is 'upper', x = j + 0.5, y = Nrows - i - 0.5
If extent is not None, x and y will be scaled to match,
as in imshow.
If origin is None and extent is not None, then extent
will give the minimum and maximum values of x and y.
rUzInput must be a 2D array.rr"z%Input z must be at least a 2x2 array.Ng<00>?r<>rz) rKr1r<>r<>r<>r rLr<>Zlinspace) rr<rMrNZx0<78>x1Zy0<79>y1rrr<>r<>rrrrH1s,





 
   zQuadContourSet._initialize_x_ya*$
Plot contours.
Call signature::
contour([X, Y,] Z, [levels], **kwargs)
`.contour` and `.contourf` draw contour lines and filled contours,
respectively. Except as noted, function signatures and return values
are the same for both versions.
Parameters
----------
X, Y : array-like, optional
The coordinates of the values in *Z*.
*X* and *Y* must both be 2-D with the same shape as *Z* (e.g.
created via `numpy.meshgrid`), or they must both be 1-D such
that ``len(X) == M`` is the number of columns in *Z* and
``len(Y) == N`` is the number of rows in *Z*.
If not given, they are assumed to be integer indices, i.e.
``X = range(M)``, ``Y = range(N)``.
Z : array-like(N, M)
The height values over which the contour is drawn.
levels : int or array-like, optional
Determines the number and positions of the contour lines / regions.
If an int *n*, use *n* data intervals; i.e. draw *n+1* contour
lines. The level heights are automatically chosen.
If array-like, draw contour lines at the specified levels.
The values must be in increasing order.
Returns
-------
c : `~.contour.QuadContourSet`
Other Parameters
----------------
corner_mask : bool, optional
Enable/disable corner masking, which only has an effect if *Z* is
a masked array. If ``False``, any quad touching a masked point is
masked out. If ``True``, only the triangular corners of quads
nearest those points are always masked out, other triangular
corners comprising three unmasked points are contoured as usual.
Defaults to :rc:`contour.corner_mask`, which defaults to ``True``.
colors : color string or sequence of colors, optional
The colors of the levels, i.e. the lines for `.contour` and the
areas for `.contourf`.
The sequence is cycled for the levels in ascending order. If the
sequence is shorter than the number of levels, it's repeated.
As a shortcut, single color strings may be used in place of
one-element lists, i.e. ``'red'`` instead of ``['red']`` to color
all levels with the same color. This shortcut does only work for
color strings, not for other ways of specifying colors.
By default (value *None*), the colormap specified by *cmap*
will be used.
alpha : float, optional
The alpha blending value, between 0 (transparent) and 1 (opaque).
cmap : str or `.Colormap`, optional
A `.Colormap` instance or registered colormap name. The colormap
maps the level values to colors.
Defaults to :rc:`image.cmap`.
If given, *colors* take precedence over *cmap*.
norm : `~matplotlib.colors.Normalize`, optional
If a colormap is used, the `.Normalize` instance scales the level
values to the canonical colormap range [0, 1] for mapping to
colors. If not given, the default linear scaling is used.
vmin, vmax : float, optional
If not *None*, either or both of these values will be supplied to
the `.Normalize` instance, overriding the default color scaling
based on *levels*.
origin : {*None*, 'upper', 'lower', 'image'}, optional
Determines the orientation and exact position of *Z* by specifying
the position of ``Z[0, 0]``. This is only relevant, if *X*, *Y*
are not given.
- *None*: ``Z[0, 0]`` is at X=0, Y=0 in the lower left corner.
- 'lower': ``Z[0, 0]`` is at X=0.5, Y=0.5 in the lower left corner.
- 'upper': ``Z[0, 0]`` is at X=N+0.5, Y=0.5 in the upper left
corner.
- 'image': Use the value from :rc:`image.origin`.
extent : (x0, x1, y0, y1), optional
If *origin* is not *None*, then *extent* is interpreted as in
`.imshow`: it gives the outer pixel boundaries. In this case, the
position of Z[0,0] is the center of the pixel, not a corner. If
*origin* is *None*, then (*x0*, *y0*) is the position of Z[0,0],
and (*x1*, *y1*) is the position of Z[-1,-1].
This argument is ignored if *X* and *Y* are specified in the call
to contour.
locator : ticker.Locator subclass, optional
The locator is used to determine the contour levels if they
are not given explicitly via *levels*.
Defaults to `~.ticker.MaxNLocator`.
extend : {'neither', 'both', 'min', 'max'}, optional, default: 'neither'
Determines the ``contourf``-coloring of values that are outside the
*levels* range.
If 'neither', values outside the *levels* range are not colored.
If 'min', 'max' or 'both', color the values below, above or below
and above the *levels* range.
Values below ``min(levels)`` and above ``max(levels)`` are mapped
to the under/over values of the `.Colormap`. Note, that most
colormaps do not have dedicated colors for these by default, so
that the over and under values are the edge values of the colormap.
You may want to set these values explicitly using
`.Colormap.set_under` and `.Colormap.set_over`.
.. note::
An exising `.QuadContourSet` does not get notified if
properties of its colormap are changed. Therefore, an explicit
call `.QuadContourSet.changed()` is needed after modifying the
colormap. The explicit call can be left out, if a colorbar is
assigned to the `.QuadContourSet` because it internally calls
`.QuadContourSet.changed()`.
Example::
x = np.arange(1, 10)
y = x.reshape(-1, 1)
h = x * y
cs = plt.contourf(h, levels=[10, 30, 50],
colors=['#808080', '#A0A0A0', '#C0C0C0'], extend='both')
cs.cmap.set_over('red')
cs.cmap.set_under('blue')
cs.changed()
xunits, yunits : registered units, optional
Override axis units by specifying an instance of a
:class:`matplotlib.units.ConversionInterface`.
antialiased : bool, optional
Enable antialiasing, overriding the defaults. For
filled contours, the default is *True*. For line contours,
it is taken from :rc:`lines.antialiased`.
Nchunk : int >= 0, optional
If 0, no subdivision of the domain. Specify a positive integer to
divide the domain into subdomains of *nchunk* by *nchunk* quads.
Chunking reduces the maximum length of polygons generated by the
contouring algorithm which reduces the rendering workload passed
on to the backend and also requires slightly less RAM. It can
however introduce rendering artifacts at chunk boundaries depending
on the backend, the *antialiased* flag and value of *alpha*.
linewidths : float or sequence of float, optional
*Only applies to* `.contour`.
The line width of the contour lines.
If a number, all levels will be plotted with this linewidth.
If a sequence, the levels in ascending order will be plotted with
the linewidths in the order specified.
Defaults to :rc:`lines.linewidth`.
linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional
*Only applies to* `.contour`.
If *linestyles* is *None*, the default is 'solid' unless the lines
are monochrome. In that case, negative contours will take their
linestyle from :rc:`contour.negative_linestyle` setting.
*linestyles* can also be an iterable of the above strings
specifying a set of linestyles to be used. If this
iterable is shorter than the number of contour levels
it will be repeated as necessary.
hatches : List[str], optional
*Only applies to* `.contourf`.
A list of cross hatch patterns to use on the filled areas.
If None, no hatching will be added to the contour.
Hatching is supported in the PostScript, PDF, SVG and Agg
backends only.
Notes
-----
1. `.contourf` differs from the MATLAB version in that it does not draw
the polygon edges. To draw edges, add line contours with calls to
`.contour`.
2. `.contourf` fills intervals that are closed at the top; that is, for
boundaries *z1* and *z2*, the filled region is::
z1 < Z <= z2
except for the lowest interval, which is closed on both sides (i.e.
it includes the lowest value).
N)
rrrrr<>rrGrIrHZ _contour_docrrrrrE<00>s07}rE)1r<00>numbersrZnumpyr rZ
matplotlibr<EFBFBD>Zmatplotlib.path<74>pathr<68>Zmatplotlib.tickerr<72>Z matplotlib.cmr;Zmatplotlib.colorsrr9Zmatplotlib.collectionsr<73>r Zmatplotlib.font_managerr4Zmatplotlib.textrZmatplotlib.cbookrCZmatplotlib.mathtextrlZmatplotlib.patchesZpatchesr(Zmatplotlib.texmanagerrkZmatplotlib.transformsZ
transformsr!Zmatplotlib.blocking_inputrrr<00>objectrr<>r<>r<>r<r<>rErrrr<00><module>sB              
R #F