KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux server112.speedpacket.com 3.10.0-962.3.2.lve1.5.36.el7.x86_64 #1 SMP Mon May 18 02:16:06 EDT 2020 x86_64
User : equistyl ( 1341)
PHP Version : 8.1.30
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/matplotlib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/matplotlib/colorbar.pyc
�
r`]c@s�dZddlmZddlZddlZddlZddlj	Z
ddljZddl
jZddljZddljZddljZddljZddljZddljZddljZddlj Z ddlm!Z!dZ"dZ#de"e#fZ$e!j%j&de$�d	�Z'd
ej(fd��YZ)de)fd
��YZ*e!j+e"�d��Z,e!j+e"�d��Z-de*fd��YZ.d�Z/dS(s�
Colorbar toolkit with two classes and a function:

    :class:`ColorbarBase`
        the base class with full colorbar drawing functionality.
        It can be used as-is to make a colorbar for a given colormap;
        a mappable object (e.g., image) is not needed.

    :class:`Colorbar`
        the derived class for use with images or contour plots.

    :func:`make_axes`
        a function for resizing an axes and adding a second axes
        suitable for a colorbar

The :meth:`~matplotlib.figure.Figure.colorbar` method uses :func:`make_axes`
and :class:`Colorbar`; the :func:`~matplotlib.pyplot.colorbar` function
is a thin wrapper over :meth:`~matplotlib.figure.Figure.colorbar`.

i����(tprint_functionN(t	docstringsd

    ============= ====================================================
    Property      Description
    ============= ====================================================
    *orientation* vertical or horizontal
    *fraction*    0.15; fraction of original axes to use for colorbar
    *pad*         0.05 if vertical, 0.15 if horizontal; fraction
                  of original axes between colorbar and new image axes
    *shrink*      1.0; fraction by which to shrink the colorbar
    *aspect*      20; ratio of long to short dimensions
    *anchor*      (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal;
                  the anchor point of the colorbar axes
    *panchor*     (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal;
                  the anchor point of the colorbar parent axes
    ============= ====================================================

sn

    ============  ====================================================
    Property      Description
    ============  ====================================================
    *extend*      [ 'neither' | 'both' | 'min' | 'max' ]
                  If not 'neither', make pointed end(s) for out-of-
                  range values.  These are set for a given colormap
                  using the colormap set_under and set_over methods.
    *extendfrac*  [ *None* | 'auto' | length | lengths ]
                  If set to *None*, both the minimum and maximum
                  triangular colorbar extensions with have a length of
                  5% of the interior colorbar length (this is the
                  default setting). If set to 'auto', makes the
                  triangular colorbar extensions the same lengths as
                  the interior boxes (when *spacing* is set to
                  'uniform') or the same lengths as the respective
                  adjacent interior boxes (when *spacing* is set to
                  'proportional'). If a scalar, indicates the length
                  of both the minimum and maximum triangular colorbar
                  extensions as a fraction of the interior colorbar
                  length. A two-element sequence of fractions may also
                  be given, indicating the lengths of the minimum and
                  maximum colorbar extensions respectively as a
                  fraction of the interior colorbar length.
    *spacing*     [ 'uniform' | 'proportional' ]
                  Uniform spacing gives each discrete color the same
                  space; proportional makes the space proportional to
                  the data interval.
    *ticks*       [ None | list of ticks | Locator object ]
                  If None, ticks are determined automatically from the
                  input.
    *format*      [ None | format string | Formatter object ]
                  If None, the
                  :class:`~matplotlib.ticker.ScalarFormatter` is used.
                  If a format string is given, e.g. '%.3f', that is
                  used. An alternative
                  :class:`~matplotlib.ticker.Formatter` object may be
                  given instead.
    *drawedges*   [ False | True ] If true, draw lines at color
                  boundaries.
    ============  ====================================================

    The following will probably be useful only in the context of
    indexed colors (that is, when the mappable has norm=NoNorm()),
    or other unusual circumstances.

    ============   ===================================================
    Property       Description
    ============   ===================================================
    *boundaries*   None or a sequence
    *values*       None or a sequence which must be of length 1 less
                   than the sequence of *boundaries*. For each region
                   delimited by adjacent entries in *boundaries*, the
                   color mapped to the corresponding value in values
                   will be used.
    ============   ===================================================

s!


Add a colorbar to a plot.

Function signatures for the :mod:`~matplotlib.pyplot` interface; all
but the first are also method signatures for the
:meth:`~matplotlib.figure.Figure.colorbar` method::

  colorbar(**kwargs)
  colorbar(mappable, **kwargs)
  colorbar(mappable, cax=cax, **kwargs)
  colorbar(mappable, ax=ax, **kwargs)

arguments:

  *mappable*
    the :class:`~matplotlib.image.Image`,
    :class:`~matplotlib.contour.ContourSet`, etc. to
    which the colorbar applies; this argument is mandatory for the
    :meth:`~matplotlib.figure.Figure.colorbar` method but optional for the
    :func:`~matplotlib.pyplot.colorbar` function, which sets the
    default to the current image.

keyword arguments:

  *cax*
    None | axes object into which the colorbar will be drawn
  *ax*
    None | parent axes object from which space for a new
    colorbar axes will be stolen
  *use_gridspec*
    False | If *cax* is None, a new *cax* is created as an instance of
    Axes. If *ax* is an instance of Subplot and *use_gridspec* is True,
    *cax* is created as an instance of Subplot using the
    grid_spec module.


Additional keyword arguments are of two kinds:

  axes properties:
%s
  colorbar properties:
%s

If *mappable* is a :class:`~matplotlib.contours.ContourSet`, its *extend*
kwarg is included automatically.

Note that the *shrink* kwarg provides a simple way to keep a vertical
colorbar, for example, from being taller than the axes of the mappable
to which the colorbar is attached; but it is a manual method requiring
some trial and error. If the colorbar is too tall (or a horizontal
colorbar is too wide) use a smaller value of *shrink*.

For more precise control, you can manually specify the positions of
the axes objects in which the mappable and the colorbar are drawn.  In
this case, do not use any of the axes properties kwargs.

It is known that some vector graphics viewer (svg and pdf) renders white gaps
between segments of the colorbar. This is due to bugs in the viewers not
matplotlib. As a workaround the colorbar can be rendered with overlapping
segments::

    cbar = colorbar()
    cbar.solids.set_edgecolor("face")
    draw()

However this has negative consequences in other circumstances. Particularly with
semi transparent images (alpha < 1) and colorbar extensions and is not enabled
by default see (issue #1188).

returns:
    :class:`~matplotlib.colorbar.Colorbar` instance; see also its base class,
    :class:`~matplotlib.colorbar.ColorbarBase`.  Call the
    :meth:`~matplotlib.colorbar.ColorbarBase.set_label` method
    to label the colorbar.

tcolorbar_doccOstjd�dS(Ns,Use the colorbar set_ticks() method instead.(twarningstwarn(targstkw((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt_set_ticks_on_axis_warn�stColorbarBasecBs}eZdZiedd&�d6edd�d6edd&�d6edd�d6Zd&d&d&d&d&ddd	d&d&eed&d
�
Zd�Z	d�Z
d
�Zd�Zd�Z
d�Zed�Zed�Zd�Zd�Zd�Zd�Zd�Zd�Zed�Zd�Zd&d�Zd�Zd�Zd�Zdd �Zd!�Zd"�Zd#�Z d$�Z!d%�Z"RS('sF
    Draw a colorbar in an existing axes.

    This is a base class for the :class:`Colorbar` class, which is the
    basis for the :func:`~matplotlib.pyplot.colorbar` function and the
    :meth:`~matplotlib.figure.Figure.colorbar` method, which are the
    usual ways of creating a colorbar.

    It is also useful by itself for showing a colormap.  If the *cmap*
    kwarg is given but *boundaries* and *values* are left as None,
    then the colormap will be displayed on a 0-1 scale. To show the
    under- and over-value colors, specify the *norm* as::

        colors.Normalize(clip=False)

    To show the colors versus index instead of on the 0-1 scale,
    use::

        norm=colors.NoNorm.

    Useful attributes:

        :attr:`ax`
            the Axes instance in which the colorbar is drawn

        :attr:`lines`
            a list of LineCollection if lines were drawn, otherwise
            an empty list

        :attr:`dividers`
            a LineCollection if *drawedges* is True, otherwise None

    Useful public methods are :meth:`set_label` and :meth:`add_lines`.

    itneitherii����tbothtmintmaxtverticaltuniformcCs�||_|j�|dkr.tj�}n|dkrItj�}n||_tjj	|d|d|�||_
||_||_|j
||_|	|_||_||_|
|_||_d|_t�|_d|_d|_d|_|jd�tj|
�r3tj|
dt|
��|_ n	|
|_ |dkr�t!|j"tj#�rotj$�|_%q�tj&�|_%n-tj'|�r�tj(|�|_%n	||_%|j)�|j*�dS(Ntcmaptnormttnbins(+taxt	_patch_axtNonetcmtget_cmaptcolorst	NormalizetalphatScalarMappablet__init__tvaluest
boundariestextendt_slice_dictt_insidetspacingtorientationt	drawedgestfilledt
extendfractsolidstlisttlinestoutlinetpatchtdividerst	set_labeltcbooktiterablettickertFixedLocatortlentlocatort
isinstanceRtLogNormtLogFormatterMathtextt	formattertScalarFormattertis_string_liketFormatStrFormattertconfig_axistdraw_all(tselfRRRRRRR#RR"ttickstformatR$R%R&((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR�sF	
													
!		
cCs
|jdkS(s.Returns whether the lower limit is open ended.R
R(R
smin(R(R=((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt
_extend_lower,scCs
|jdkS(s-Returns whether the uper limit is open ended.R
R(sbothsmax(R(R=((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt
_extend_upper0scCst|j_t|j_dS(N(RRt
set_xtickst
set_yticks(R=((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR4scCsu|j�|j�|j�\}}|jdd�tjf}|j||�|jrq|j|||�ndS(ss
        Calculate any free parameters based on the current cmap and norm,
        and do all the drawing.
        N(	t_process_valuest_find_ranget_mesht_valuestnptnewaxist_config_axesR%t_add_solids(R=tXtYtC((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR<:s

	cCsy|j}|jdkrK|jjg�|jjd�|jjd�n |jjg�|jjd�|j�dS(NR
trighttbottom(RR#txaxist	set_tickstyaxistset_label_positiontset_ticks_positiont
_set_label(R=R((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR;Gs	cCs�|j}|j�\}}}|jdkrc|jj|�|j|�|jj�j|�n3|jj|�|j	|�|jj�j|�dS(s�
        Force the update of the ticks and ticklabels. This must be
        called whenever the tick locator and/or tick formatter changes.
        R
N(
Rt_tickerR#RSRRtset_yticklabelstget_major_formattertset_offset_stringRQtset_xticklabels(R=RR>t
ticklabelst
offset_string((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pytupdate_ticksSs	

cCsPtj|�r0tj|dt|��|_n	||_|rL|j�ndS(s�
        set tick locations. Tick locations are updated immediately unless update_ticks is
        *False*. To manually update the ticks, call *update_ticks* method explicitly.
        RN(R.R/R0R1R2R3R^(R=R>R^((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRRds
!	cCsNt|jtj�r=tj|�|_|rJ|j�qJn
tjd�dS(s�
        set tick labels. Tick labels are updated immediately unless update_ticks is
        *False*. To manually update the ticks, call *update_ticks* method explicitly.
        s"set_ticks() must have been called.N(	R4R3R0R1tFixedFormatterR7R^RR(R=R\R^((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pytset_ticklabelsqs
c
Csz|j}|jt�|jt�|j||�}|j|�|j|jj�|j	|jj
�|jdk	r�|jj
�ntj|dd�df|dd�dfdtjddtjd�|_|j|j�|jjd�|jjd�tjd}|jdk	r2|jj
�ntj|d	|d
|dddd
�|_|j|j�|j�dS(s1
        Make an axes patch and outline.
        Niitcolorsaxes.edgecolort	linewidthsaxes.linewidthsaxes.facecolort	edgecolort	facecolorg{�G�z�?tzorderi����(Rtset_frame_ontFalsetset_navigatet_outlinetupdate_datalimtset_xlimtdataLimt	intervalxtset_ylimt	intervalyR*RtremoveR)tLine2DtmpltrcParamst
add_artisttset_clip_boxt
set_clip_pathR+tmpatchestPolygonR^(R=RLRMRtxytc((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRJ~s.	


<
cCsH|jdkr+|jj|j|j�n|jj|j|j�dS(NR
(R#Rt
set_ylabelt_labelt_labelkwt
set_xlabel(R=((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRV�scKs'd|f|_||_|j�dS(s5
        Label the long axis of the colorbar
        s%sN(R|R}RV(R=tlabelR((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR-�s	c	Cs�|jd}dd|d|dd|dd|d|d|dg	}tjtjtj|��|�}tjtjtj|��|�}|jt|�df�}|jt|�df�}|jdkr�tj||f�Stj||f�S(so
        Return *x*, *y* arrays of colorbar bounding polygon,
        taking orientation into account.
        iiit
horizontal(	tshapeRHttaketravelt	transposetreshapeR2R#thstack(R=RLRMtNtiitxty((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRi�s
=$$cCs�|jd}|jdkrQgtd|d�D]}t||||�^q0Sgtd|d�D]}t||||�^qeSdS(sM
        Return the separator line segments; helper for _add_solids.
        iR
iN(R�R#txrangetzip(R=RLRMR�ti((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt_edges�s
5c	Csn|jdkr!|||f}n*tj|�tj|�tj|�f}td|jd|jd|jdd�}|jj�}|jj	t
�|jj||�}|jj	|�|jdk	r�|jj�n||_|jdk	r	|jj�d|_n|jrjtj|j||�dtjdfd	d
tjdf�|_|jj|j�ndS(
st
        Draw the colors using :meth:`~matplotlib.axes.Axes.pcolormesh`;
        optionally add separators.
        R
RRRt
edgecolorsRRsaxes.edgecolort
linewidthsg�?saxes.linewidthN(R#RHR�tdictRRRRtisholdtholdtTruet
pcolormeshR'RRpR,R$tcollectionstLineCollectionR�RrRstadd_collection(R=RLRMRNRRt_holdtcol((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRK�s,*				
	cCs�|j|�}t|�}|dk|dk@}||}tj|�r`tj|�|}ntj|�r�tj|�|}nt|�}tjddg�}	tj|	|�\}
}|jdkrgt	|�D]}t
|
|||�^q�}
n0gt	|�D]}t
|||
|�^q
}
tj|
d|�}|r~|j
r~x|j
D]}|j�q^Wg|_
n|j
j|�|j|�|jj|�dS(s�
        Draw lines on the colorbar.

        *colors* and *linewidths* must be scalars or
        sequences the same length as *levels*.

        Set *erase* to False to add lines without first
        removing any previously added lines.
        gj�t��?g����MbP�gg�?R
R�N(t_locateR2R.R/RHtasarraytarraytmeshgridR#R�R�R�R�R)Rptappendt	set_colorRR�(R=tlevelsRR�teraseR�tnlevstigoodR�R�RLRMR�RyR�tlc((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt	add_lines�s,

30
c
CsS|j}|j}|dkr|jdkr�t|jtj�r�t|j	�}dt
|d�}tjd|dd�}qt|jtj
�r�|jj}tj|dd�}qt|jtj�r�tj�}qtj�}q|j|j}tj|dd�}nt|jtj�rF|j	d|j	df}n|j|jf}|jd|d�|jd|d�|j|�|j|�|j|�|j|�tj|��}|j|�}|d	k|d
k@}||}||}|j|�gt|�D]\}	}
||
|	�^q}|j�}|||fS(si
        Return two sequences: ticks (colorbar data locations)
        and ticklabels (strings).
        ii
tbasetoffsetiRi����tminposg����MbP�gj�t��?N(R3R7RRR4RRtNoNormR2RGtintR0tIndexLocatortBoundaryNormR1R5t
LogLocatortMaxNLocatort_boundariesR!tvmintvmaxtcreate_dummy_axistset_view_intervaltset_data_intervalRHR�R�tset_locst	enumeratet
get_offset(
R=R3R7tnvR�tbtintvR>tinrangeR�ttR\R]((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRW
sD		






.cCs!|dkr|j}n|dk	r�tj|dt�|_|jdkr�d|jd |jd|_t|j	t
j�r�|jdjtj
�|_ndStj|j�|_dS|jdk	r�tj|j�|_|jdkrqtjt|j�dd�}d|jd |jd|dd+d|d|d	|d
<d|d|d|d<||_dStj|j�|_dSt|j	t
j�r^|j|jjd�|jjd}tjt|�dfdtj
�}tj|jjdtj
�||j<|j�r)d|d
<n|j�rH|jj|d<n||_||_dSt|j	t
j�rt|j	j�}|j�r�|d
dg|}n|j�r�||ddg}ntj|�}tjt|�dfdt�}|j	j}d|d |d||j<|j�rH|d
d|d
<n|j�ri|dd|d<n||_||_dS|j	j�s�d
|j	_d|j	_n|j	j|j|jjd��}|j�r�|d
d|d
<n|j�r|dd|d<n|j|�dS(
s�
        Set the :attr:`_boundaries` and :attr:`_values` attributes
        based on the input boundaries and values.  Input boundaries
        can be *self.boundaries* or the argument *b*.
        tdtypeg�?i����ig�h㈵��>Ntdg@iii����i����(RRRHR�tfloatR�RRGR4RRR�tastypetint16R�tzerosR2t
_uniform_yRR�tarangeR!R@RAR�R(tscaledR�R�tinverseRD(R=R�tvtbi((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRD9sx
#	'%%
		"		%cCs.|j|j}|d|_|d|_dS(s�
        Set :attr:`vmin` and :attr:`vmax` attributes to the first and
        last boundary excluding extended end boundaries.
        ii����N(R�R!R�R�(R=R�((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyREs
cCsKt|j�}|jdkr+|d8}n|jdkrG|d8}n|S(s1number of boundaries **before** extension of endsR
iRRi(sminsmax(R2R�R(R=tnb((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt
_central_N�s

cCsL|jjd}|jdkr,|d7}n|jdkrH|d7}n|S(se
        Based on the colormap and extend variable, return the
        number of boundaries.
        iR
iRR(sminsmax(RR�R(R=R�((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt_extended_N�s

g�������?cCs�tj||g�}t|t�r\|j�dkrM||d<||d<q�td��na|dk	r�y,||(tj|�j�r�t��nWq�t	tfk
r�td��q�Xn|S(sv
        Get the lengths of colorbar extensions.

        A helper method for _uniform_y and _proportional_y.
        tautoiisinvalid value for extendfracN(
RHR�R4tstrtlowert
ValueErrorRtisnantanyt	TypeError(R=tfractautomintautomaxtdefaulttextendlength((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt_get_extension_lengths�s

cCs%|jdkr'tjdd|�}n�d|d}}|j|j||dd�}|jdkr�tj|dd	�}d
|d|d<d|d|d<nb|jdkr�tj|dd	�}d
|d|d<n(tj|dd	�}d|d|d<tjdd|�||j<|S(
sv
        Return colorbar data coordinates for *N* uniformly
        spaced boundaries, plus ends if required.
        R	iig�?R�g�������?R
iR�gi����R(RRHtlinspaceR�R&R�R!(R=R�R�R�R�R�((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR��s c	Cs�t|jtj�rX|j|j}|j|jd}||jd|jd}n|j|jj��}|jdkr�|d|d}|d|d|}|d|d|}n�|jdkr|d|d}|d|d|}|d|d|}n>|d|d}|d|d|}|d|d|}|j|j	||d	d
�}|jdkr�d|d|d<n|jdkr�d
|d|d<n||j}tj
|d|d�}||�||j<|S(si
        Return colorbar data coordinates for the boundaries of
        a proportional colorbar.
        ii����Riii����Ri����R�g�������?R
gg�?(sbothsmin(sbothsmax(R4RRR�R�R!tcopyRR�R&R(	R=R�R�tclenR�R�R�tyiR((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt_proportional_y�s4
cCs�tjddg�}|jdkr<|j|j��}n|j�}||_tj||�\}}|j�r�d|ddd�f<n|j	�r�d|ddd�f<n||fS(s�
        Return X,Y, the coordinate arrays for the colorbar pcolormesh.
        These are suitable for a vertical colorbar; swapping and
        transposition for a horizontal colorbar are done outside
        this function.
        gg�?Rg�?iNi����(
RHR�R"R�R�R�t_yR�R@RA(R=R�R�RLRM((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRF�s	c
Csht|jtjtjf�r0|j}|}n9|j|jdt�j�}|j|dt�j�}|j}t	|�}t
j||�}|d}||k}|dk}	||cd8<||cd8<||	cd7<||	cd7<t
j||�t
j||�}
t
j||�t
j||�}t
j||�|t
j||�||
}|S(sq
        Given a set of color data values, return their
        corresponding colorbar data coordinates.
        tclipii(
R4RRR�R�R�RgR%R�R2RHtsearchsortedR�(
R=R�R�txnR�R�R�ti0titoptibottdbtdytz((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR�s&			
"".cCs
||_dS(N(R(R=R((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt	set_alpha,sN(#t__name__t
__module__t__doc__tsliceRR RgR�RR@RARR<R;R^RRR`RJRVR-RiR�RKR�RWRDRER�R�R�R�R�RFR�R�(((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR�sX#(				
		

							#$	,F							%		!tColorbarcBs>eZdZd�Zd�Zed�Zd�Zd�ZRS(s�
    This class connects a :class:`ColorbarBase` to a
    :class:`~matplotlib.cm.ScalarMappable` such as a
    :class:`~matplotlib.image.AxesImage` generated via
    :meth:`~matplotlib.axes.Axes.imshow`.

    It is not intended to be instantiated directly; instead,
    use :meth:`~matplotlib.figure.Figure.colorbar` or
    :func:`~matplotlib.pyplot.colorbar` to make your colorbar.

    cKs|j�||_|j|d<|j|d<t|tj�r�|}|j�|d<|j|d<|j	|d<|j
|d<|jdtj
|jdd	��|j|d
<tj|||�|js|j|�qn8t|tj�r�|j�|d<ntj|||�dS(NRRRRRRR>Ri
R%(tautoscale_NonetmappableRRR4tcontourt
ContourSett	get_alphat_levelstcvaluesRt
setdefaultR0R1R�R%RRR�tmartisttArtist(R=RR�RtCS((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR<s$
	




"
	cCs7|j|j��|j|j��|j|�dS(s�
        Updates this colorbar to match the mappable's properties.

        Typically this is automatically registered as an event handler
        by :func:`colorbar_factory` and should not be called manually.

        N(tset_cmapRtset_climtget_climt
update_normal(R=R�((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyton_mappable_changedXscCs�t|tj�s|jr+td��ng|jD]}|d^q5}g|jD]}|d^qU}tj||j	||d|�dS(s�
        Add the lines from a non-filled
        :class:`~matplotlib.contour.ContourSet` to the colorbar.

        Set *erase* to False if these lines should be added to
        any pre-existing lines.
        s+add_lines is only for a ContourSet of linesiR�N(
R4R�R�R%R�ttcolorsttlinewidthsRR�R�(R=R�R�RzR�R�R((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR�ds  	cCsH|j�t|jtj�rD|j}|jsD|j|�qDndS(s�
        update solid, lines, etc. Unlike update_bruteforce, it does
        not clear the axes.  This is meant to be called when the image
        or contour plot to which this colorbar belongs is changed.
        N(R<R4R�R�R�R%R�(R=R�R�((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR�{s

		cCs�|jj�d|_d|_d|_t�|_d|_|j	|j
��|j|_|j|_|j
�|j�t|jtj�r�|j}|js�|j|�q�ndS(s
        Destroy and rebuild the colorbar.  This is
        intended to become obsolete, and will probably be
        deprecated and then removed.  It is not called when
        the pyplot.colorbar function or the Figure.colorbar
        method are used to create the colorbar.

        N(RtclaRR*R+R'R(R)R,R�R�RRR;R<R4R�R�R�R%R�(R=R�R�((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pytupdate_bruteforce�s

				

		(	R�R�R�RR�R�R�R�R(((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR�0s			
cKs�|jdd�}|jdd�}|jdd�}|jdd�}|jd	t�j�}|dkr�|jd
d�}d|}|j|||�\}	}
}|jd|�jd|�}|jd
d�}|jdd�}
n}|jd
d�}|j|||�\}}
}	|j|d�jd|�}d|}|jd
d�}|jdd�}
|j	|	�|j
|
�|j�}|j|�}|j
|d
|dd�||fS(s�
    Resize and reposition a parent axes, and return a child
    axes suitable for a colorbar::

        cax, kw = make_axes(parent, **kw)

    Keyword arguments may include the following (with defaults):

        *orientation*
            'vertical'  or 'horizontal'

    %s

    All but the first of these are stripped from the input kw set.

    Returns (cax, kw), the child axes and the reduced kw dictionary.
    R#R
tfractiong333333�?tshrinkg�?taspectitoriginaltpadg�������?RNtanchorgg�?tpanchort
adjustabletbox(gg�?(g�?g�?(g�?g�?(g�?g(R�tpoptget_positionR�tfrozentsplitxtshrunktanchoredtsplitytset_positiont
set_anchort
get_figuretadd_axest
set_aspect(tparentRR#RRRtpbRtx1tpb1tpbxtpbcbRR	tfigtcax((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt	make_axes�s0



c
Ks|jdd�}|jdd�}|jdd�}|jdd�}d|}d|d	}|||g}tj}	|dkr
|jd
d�}
d|
d
|
}|	d
dd|j�d|d||
|g�}|	dd
d|d
ddd|�}
d}d}n�|jd
d�}
d|
d
|
}|	dd
d|j�d|d||
|g�}|	d
dd|d
ddd|�}
d|}d}d}|j|d�|j�|j|j�|j	|�|j
�}|j|
d
�}|j|d|dd�||fS(s�
    Resize and reposition a parent axes, and return a child axes
    suitable for a colorbar. This function is similar to
    make_axes. Prmary differences are

     * *make_axes_gridspec* should only be used with a subplot parent.

     * *make_axes* creates an instance of Axes. *make_axes_gridspec*
        creates an instance of Subplot.

     * *make_axes* updates the position of the
        parent. *make_axes_gridspec* replaces the grid_spec attribute
        of the parent with a new one.

    While this function is meant to be compatible with *make_axes*,
    there could be some minor differences.::

        cax, kw = make_axes_gridspec(parent, **kw)

    Keyword arguments may include the following (with defaults):

        *orientation*
            'vertical'  or 'horizontal'

    %s

    All but the first of these are stripped from the input kw set.

    Returns (cax, kw), the child axes and the reduced kw dictionary.
    R#R
Rg333333�?Rg�?Rig�?Rg�������?iitsubplot_spectwspacetwidth_ratiosithspacegt
height_ratiosiRR
R(gg�?(g�?g�?(g�?g�?(g�?g(
R�RtgridspectGridSpecFromSubplotSpectget_subplotspectset_subplotspect
update_paramsRtfigboxRRtadd_subplotR(RRR#RRRRtpad_st	wh_ratiostgs_from_subplotspecRtwh_spacetgstgs2RR	RR((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pytmake_axes_gridspec�sT!
	
		
	


t
ColorbarPatchcBs eZdZd�Zd�ZRS(s]
    A Colorbar which is created using :class:`~matplotlib.patches.Patch`
    rather than the default :func:`~matplotlib.axes.pcolor`.

    It uses a list of Patch instances instead of a
    :class:`~matplotlib.collections.PatchCollection` because the
    latter does not allow the hatch pattern to vary among the
    members of the collection.
    cKs#g|_tj||||�dS(N(tsolids_patchesR�R(R=RR�R((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRDs	cCsp|jj�}|jjt�i|jd6}t|�}|jj|}g}xLtt|�d�D]4}	||	d}
||	}t	j
||	d||	dg||	d||	dg||	dd||	ddg||	dd||	ddgg�}|jdkr4|dddd�f}ntj
tj|�d|j|j|
��d	|d
dddd
t|�}
|jj|
�|j|
�qhW|jr�x|jD]}|j�q�Wn||_|jdk	r�|jj�d|_n|jr\tj|j||�dtjdfddtjdf�|_|jj|j�n|jj|�dS(sn
        Draw the colors using :class:`~matplotlib.patches.Patch`;
        optionally add separators.
        RiiR�.Ni����RdthatchRctnoneRbtantialiasedRsaxes.edgecolorR�g�?saxes.linewidth( RR�R�R�RR2R�thatchesR�RHR�R#Rwt	PathPatchtmpathtPathRRRgt	add_patchR�R5RpR,RR$R�R�R�RrRsR�(R=RLRMRNR�Rt
n_segmentsR9tpatchesR�tvalR6RyR+tsolid((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyRKKsB
8K		
	(R�R�R�RRK(((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyR4:s		cKs�t|tj�rOtg|jD]}|dk	^q�rOt|||�}nt|||�}|jj	d|j
�|j||�|S(s�
    Creates a colorbar on the given axes for the given mappable.

    Typically, for automatic colorbar placement given only a mappable use
    :meth:`~matplotlib.figure.Figure.colorbar`.

    tchangedN(R4R�R�R�R9RR4R�tcallbacksSMtconnectR�tset_colorbar(RR�tkwargsR6tcb((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pytcolorbar_factory�s
((0R�t
__future__RRtnumpyRHt
matplotlibRrtmatplotlib.artisttartistR�tmatplotlib.cbookR.tmatplotlib.collectionsR�tmatplotlib.colorsRtmatplotlib.contourR�t
matplotlib.cmRtmatplotlib.gridspecR&tmatplotlib.linesR)tmatplotlib.patchesR?Rwtmatplotlib.pathtpathR;tmatplotlib.tickerR0Rtmake_axes_kw_doctcolormap_kw_docRtinterpdtupdateRRRR�tSubstitutionR R3R4RH(((s9/usr/lib64/python2.7/site-packages/matplotlib/colorbar.pyt<module>s:<N	��c}/^M

Anon7 - 2021