HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyc
�
�)�Uc@s�dZddlZddlZddlmZddljZejjd�Z	e
ee	d �\ZZ
edko}e
dkZi�dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6dd/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d`d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6ZxNej�D]@\ZZejdk�dkr`ejdkd�Zeee<q`q`Wd�Zd�Zejd�Zd �Zd!d7d"��YZe�Zd#d$�Zd%d8d&��YZd'efd(��YZd)efd*��YZd+d9d,��YZ d-e fd.��YZ!d/e fd0��YZ"d1e fd2��YZ#e Z$e#Z%d3�Z&d4�Z'd5e(fd6��YZ)dS(:s�
A module for converting numbers or color arguments to *RGB* or *RGBA*

*RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the
range 0-1.

This module includes functions and classes for color specification
conversions, and for mapping numbers to colors in a 1-D array of
colors called a colormap. Colormapping typically involves two steps:
a data array is first mapped onto the range 0-1 using an instance
of :class:`Normalize` or of a subclass; then this number in the 0-1
range is mapped to a color using an instance of a subclass of
:class:`Colormap`.  Two are provided here:
:class:`LinearSegmentedColormap`, which is used to generate all
the built-in colormap instances, but is also useful for making
custom colormaps, and :class:`ListedColormap`, which is used for
generating a custom colormap from a list of color specifications.

The module also provides a single instance, *colorConverter*, of the
:class:`ColorConverter` class providing methods for converting single
color specifications or sequences of them to *RGB* or *RGBA*.

Commands which take color arguments can use several formats to specify
the colors.  For the basic builtin colors, you can use a single letter

    - b  : blue
    - g  : green
    - r  : red
    - c  : cyan
    - m  : magenta
    - y  : yellow
    - k  : black
    - w  : white

Gray shades can be given as a string encoding a float in the 0-1
range, e.g.::

    color = '0.75'

For a greater range of colors, you have two options.  You can specify
the color using an html hex string, as in::

      color = '#eeefff'

or you can pass an *R* , *G* , *B* tuple, where each of *R* , *G* , *B*
are in the range [0,1].

Finally, legal html names for colors, like 'red', 'burlywood' and
'chartreuse' are supported.
i����N(tmat.iis#F0F8FFt	aliceblues#FAEBD7tantiquewhites#00FFFFtaquas#7FFFD4t
aquamarines#F0FFFFtazures#F5F5DCtbeiges#FFE4C4tbisques#000000tblacks#FFEBCDtblanchedalmonds#0000FFtblues#8A2BE2t
blueviolets#A52A2Atbrowns#DEB887t	burlywoods#5F9EA0t	cadetblues#7FFF00t
chartreuses#D2691Et	chocolates#FF7F50tcorals#6495EDtcornflowerblues#FFF8DCtcornsilks#DC143Ctcrimsontcyans#00008Btdarkblues#008B8Btdarkcyans#B8860Bt
darkgoldenrods#A9A9A9tdarkgrays#006400t	darkgreens#BDB76Bt	darkkhakis#8B008Btdarkmagentas#556B2Ftdarkolivegreens#FF8C00t
darkoranges#9932CCt
darkorchids#8B0000tdarkreds#E9967At
darksalmons#8FBC8Ftdarkseagreens#483D8Bt
darkslateblues#2F4F4Ft
darkslategrays#00CED1t
darkturquoises#9400D3t
darkviolets#FF1493tdeeppinks#00BFFFtdeepskyblues#696969tdimgrays#1E90FFt
dodgerblues#B22222t	firebricks#FFFAF0tfloralwhites#228B22tforestgreens#FF00FFtfuchsias#DCDCDCt	gainsboros#F8F8FFt
ghostwhites#FFD700tgolds#DAA520t	goldenrods#808080tgrays#008000tgreens#ADFF2Ftgreenyellows#F0FFF0thoneydews#FF69B4thotpinks#CD5C5Ct	indianreds#4B0082tindigos#FFFFF0tivorys#F0E68Ctkhakis#E6E6FAtlavenders#FFF0F5t
lavenderblushs#7CFC00t	lawngreens#FFFACDtlemonchiffons#ADD8E6t	lightblues#F08080t
lightcorals#E0FFFFt	lightcyans#FAFAD2tlightgoldenrodyellows#90EE90t
lightgreens#D3D3D3t	lightgreys#FFB6C1t	lightpinks#FFA07Atlightsalmons#20B2AAt
lightseagreens#87CEFAtlightskyblues#778899tlightslategrays#B0C4DEtlightsteelblues#FFFFE0tlightyellows#00FF00tlimes#32CD32t	limegreens#FAF0E6tlinentmagentas#800000tmaroons#66CDAAtmediumaquamarines#0000CDt
mediumblues#BA55D3tmediumorchids#9370DBtmediumpurples#3CB371tmediumseagreens#7B68EEtmediumslateblues#00FA9Atmediumspringgreens#48D1CCtmediumturquoises#C71585tmediumvioletreds#191970tmidnightblues#F5FFFAt	mintcreams#FFE4E1t	mistyroses#FFE4B5tmoccasins#FFDEADtnavajowhites#000080tnavys#FDF5E6toldlaces#808000tolives#6B8E23t	olivedrabs#FFA500toranges#FF4500t	orangereds#DA70D6torchids#EEE8AAt
palegoldenrods#98FB98t	palegreens#AFEEEEt
palevioletreds#FFEFD5t
papayawhips#FFDAB9t	peachpuffs#CD853Ftperus#FFC0CBtpinks#DDA0DDtplums#B0E0E6t
powderblues#800080tpurples#FF0000treds#BC8F8Ft	rosybrowns#4169E1t	royalblues#8B4513tsaddlebrowns#FA8072tsalmons#FAA460t
sandybrowns#2E8B57tseagreens#FFF5EEtseashells#A0522Dtsiennas#C0C0C0tsilvers#87CEEBtskyblues#6A5ACDt	slateblues#708090t	slategrays#FFFAFAtsnows#00FF7Ftspringgreens#4682B4t	steelblues#D2B48Cttans#008080tteals#D8BFD8tthistles#FF6347ttomatos#40E0D0t	turquoises#EE82EEtviolets#F5DEB3twheats#FFFFFFtwhites#F5F5F5t
whitesmokes#FFFF00tyellows#9ACD32tyellowgreenitgreycCs.ytj|�tSWntk
r)tSXdS(s.Return *True* if *c* can be converted to *RGB*N(tcolorConvertertto_rgbtTruet
ValueErrortFalse(tc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt
is_color_like�s


cCs/dtg|d D]}t|d�^q�S(sBGiven an rgb or rgba sequence of 0-1 floats, return the hex strings
#%02x%02x%02xii�(ttupletround(trgbtval((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytrgb2hex�ss\A#[a-fA-F0-9]{6}\ZcCs�t|t�std��ntj|�d	krFtd|��ntg|dd!|dd!|dd!fD]}t|d�d^qn�S(
s|
    Take a hex string *s* and return the corresponding rgb 3-tuple
    Example: #efefef -> (0.93725, 0.93725, 0.93725)
    s$hex2color requires a string argumentsinvalid hex color string "%s"iiiiig�o@N(	t
isinstancet
basestringt	TypeErrorthexColorPatterntmatchtNoneR�R�tint(tstn((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt	hex2color�s
tColorConvertercBsseZdZidd6dd6dd6dd6dd
6dd6dd6dd
6ZiZd�Zdd�Zdd�ZRS(s
    Provides methods for converting color specifications to *RGB* or *RGBA*

    Caching is used for more efficient conversion upon repeated calls
    with the same argument.

    Ordinarily only the single instance instantiated in this module,
    *colorConverter*, is needed.
    gg�?tbg�?tgtrg�?R�itmtytktwcCsDy|j|SWnytk
r"nitk
r�t|�}y|j|SWq�tk
r]q�tk
r�tdt|�f��q�XnXyztj|�rF|j�}|j	j
|d�}|dkr�tj
||�}|j
d�r�t|�}qCt|�}|dks|dkr-td��nt|gd�}q�n�tj|�r�t|�dksyt|�dkr�tdt|���nt|d �}g|D]*}t|�dks�|dkr�|^q�r�td	��q�ntd
��||j|<Wn8tttfk
r?}tdt|�|f��nX|S(
s�
        Returns an *RGB* tuple of three floats from 0-1.

        *arg* can be an *RGB* or *RGBA* sequence or a string in any of
        several forms:

            1) a letter from the set 'rgbcmykw'
            2) a hex color string, like '#00FFFF'
            3) a standard name, like 'aqua'
            4) a float, like '0.4', indicating gray on a 0-1 scale

        if *arg* is *RGBA*, the *A* will simply be discarded.
        s2to_rgb: arg "%s" is unhashable even inside a tuplet#iis"gray (string) must be in range 0-1iis%sequence length is %d; must be 3 or 4s(number in rbg sequence outside 0-1 ranges'cannot convert argument to rgb sequencesto_rgb: Invalid rgb arg "%s"
%sN(tcachetKeyErrorR�R�R�tstrtcbooktis_string_liketlowertcolorstgetR�tcnamest
startswithR�tfloattiterabletlen(tselftargtargltcolortstr1tfltxtexc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�sN



$7 cCs�y|j�dkrdSWntk
r-nXyvtj|�rftj|�rft|�dkrg|D]*}t|�dks�|dkri|^qir�td��n|d
kr�t	|�S|dks�|dkr�td��n|d|d|d	|fS|d
 \}}}g|||fD]*}t|�dksH|dkr$|^q$r~td��q~n|j
|�\}}}|d
kr�d}n||||fSWn5ttfk
r�}tdt|�|f��nXd
S(sU
        Returns an *RGBA* tuple of four floats from 0-1.

        For acceptable values of *arg*, see :meth:`to_rgb`.
        In addition, if *arg* is "none" (case-insensitive),
        then (0,0,0,0) will be returned.
        If *arg* is an *RGBA* sequence and *alpha* is not *None*,
        *alpha* will replace the original *A*.
        tnonegiiis)number in rbga sequence outside 0-1 rangeg�?salpha must be in range 0-1iis(number in rbg sequence outside 0-1 ranges!to_rgba: Invalid rgba arg "%s"
%sN(gggg(
R�tAttributeErrorR�R�R�R�R�R�R�R�R�R�R�(R�R�talphaR�R�R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytto_rgba=s0

7
@	c
Cs6yt|�}Wn'tk
r9tdt|���nXy8|dks[|j�dkrqtjddtj�SWntk
r�nXy)tj	|j
||�gdtj�SWn�tk
r1t|tj�r�|j
dkr|jjdkrtd��n|j
dkr�|jd	dkr�|jjd
kr�|j�d	kj�se|j�dkj�rttd��ntj|tj�}|d
k	r�|d	ks�|dkr�td��n||d
d
�df<n|Sntj|dfdtj�}x0t|�D]"\}}|j
||�||<qW|SXd
S(s
        Returns a numpy array of *RGBA* tuples.

        Accepts a single mpl color spec or a sequence of specs.

        Special case to handle "no color": if *c* is "none" (case-insensitive),
        then an empty array will be returned.  Same for an empty list.
        s-Cannot convert argument type %s to rgba arrayiR�itdtypeitSUs#Color array must be two-dimensionalitfs,number in rgba sequence is outside 0-1 rangesalpha must be in 0-1 rangeNi(ii(R�R�R�ttypeR�tnptzerosR�R�tarrayR�R�tndarraytndimR�tkindtshapetraveltanytasarrayR�t	enumerate(R�R�R�tnctresulttitcc((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt
to_rgba_arraycs<	

)
!40(ggg�?(gg�?g(g�?gg(gg�?g�?(g�?ig�?(g�?g�?i(ggg(g�?g�?g�?N(	t__name__t
__module__t__doc__R�R�R�R�R�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR��s	
	;&g�?cCs<t|�rVtjdd|�|}tjtj||�dtj�dd�}|Sytj|�}Wntd��nX|j}t|�dkr�|ddkr�t	d��n|dd�df}|dd�df}|dd�df}	|dd	ks|d
dkr*t	d��ntj
tj|�|�rUt	d
��n||d}tj|ftj�}|dtjdd|�|}tj
||�dd
!}
|dd
!||
d||
||
d||
|	|
d|	|
d|dd
+|	d|d<|d
|d
<tj|d	d�|S(s�Create an *N* -element 1-d lookup table

    *data* represented by a list of x,y0,y1 mapping correspondences.
    Each element in this list represents how a value between 0 and 1
    (inclusive) represented by x is mapped to a corresponding value
    between 0 and 1 (inclusive). The two values of y are to allow
    for discontinuous mapping functions (say as might be found in a
    sawtooth) where y0 represents the value of y for values of x
    <= to that given, and y1 is the value to be used for x > than
    that given). The list must start with x=0, end with x=1, and
    all values of x must be in increasing order. Values between
    the given mapping points are determined by simple linear interpolation.

    Alternatively, data can be a function mapping values between 0 - 1
    to 0 - 1.

    The function returns an array "result" where ``result[x*(N-1)]``
    gives the closest value for values of x between 0 and 1.
    iiR�s$data must be convertable to an arrayiisdata must be nx3 formatNgi����g�?s9data mapping points must start with x=0. and end with x=1s3data mapping points must have x in increasing order(tcallableR�tlinspacetclipR�R�R�R�R�R�tsometruetsortR�tsearchsorted(tNtdatatgammatxindtluttadataR�R�ty0ty1tind((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytmakeMappingArray�s<-	" !**tColormapcBsqeZdZdd�Zded�Zddd�Zddd�Zddd�Z	d�Z
d	�Zd
�ZRS(s�Base class for all scalar to rgb mappings

        Important methods:

            * :meth:`set_bad`
            * :meth:`set_under`
            * :meth:`set_over`
    icCs]||_||_d|_d|_d|_||_|d|_|d|_t	|_
dS(s�
        Public class attributes:
            :attr:`N` : number of rgb quantization levels
            :attr:`name` : name of colormap

        giiN(gggg(tnameR�t	_rgba_badR�t_rgba_undert
_rgba_overt_i_undert_i_overt_i_badR�t_isinit(R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt__init__�s						

c
	Cs�|js|j�nd
}tj|�sFd}tj|g�}n9d}tj|dt�}|j	d�}tj
|�}|jjtj
dkrtj||dkd�tr�tj||jd|jd	|�ntj||jd|j�}|jt�}ntj|||jd
k|j�tj||dk|j�|d
k	r�|j|jkr�tj|||j�n|r�|jdjtj�}n|jj�}|d
k	r't|d�}t|d�}|ddkj�r||d
d�df<q'||d
d
�df<ntjd|jdd|j�}	|j|ddddd	|	�|dkr�t |	dd
d
�f�}	n|	S(s
        *X* is either a scalar or an array (of any dimension).
        If scalar, a tuple of rgba values is returned, otherwise
        an array with the new shape = oldshape+(4,). If the X-values
        are integers, then they are used as indices into the array.
        If they are floating point, then they must be in the
        interval (0.0, 1.0).
        Alpha must be a scalar between 0 and 1, or None.
        If bytes is False, the rgba values will be floats on a
        0-1 scale; if True, they will be uint8, 0-255.
        tscalarR�tcopyitFloatg�?g�P���?i����toutii�gNR�iR�taxistmodeR�(i(!R�t_initR�R�R�R�R�RR�tfilledtgetmaskR�tchart	typecodestputmasktNP_CLIP_OUTR�R�tastypeR�R�R�R�R�t_luttuint8R�tmintmaxtalltemptyttakeR�(
R�tXR�tbytestmask_badtvtypetxatxmaR�trgba((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt__call__�sD
	
&#"R�cCs/tj||�|_|jr+|j�ndS(s0Set color to be used for masked values.
        N(R�R�R�R�t
_set_extremes(R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytset_bad0s	cCs/tj||�|_|jr+|j�ndS(s`Set color to be used for low out-of-range values.
           Requires norm.clip = False
        N(R�R�R�R�R(R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt	set_under6s	cCs/tj||�|_|jr+|j�ndS(saSet color to be used for high out-of-range values.
           Requires norm.clip = False
        N(R�R�R�R�R(R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytset_over=s	cCs�|jr|j|j|j<n|jd|j|j<|jrU|j|j|j<n|j|jd|j|j<|j|j|j<dS(Nii(R�RR�R�R�R�R�R�(R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyRDs		cCstd��dS(s$Generate the lookup table, self._lutsAbstract class onlyN(tNotImplementedError(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�OscCs�|js|j�ntj|jdd�df|jdd�dfk�o�tj|jdd�df|jdd�dfk�S(Niii(R�R�R�talltrueR(R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytis_graySs	
;N(
R�R�R�R�R�R�RRRRRR�R(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR��sD		tLinearSegmentedColormapcBsDeZdZddd�Zd�Zd�Zeddd��ZRS(s�Colormap objects based on lookup tables using linear segments.

    The lookup table is generated using linear interpolation for each
    primary color, with the 0-1 domain divided into any number of
    segments.
    ig�?cCs2t|_tj|||�||_||_dS(s�Create color map from linear mapping segments

        segmentdata argument is a dictionary with a red, green and blue
        entries. Each entry should be a list of *x*, *y0*, *y1* tuples,
        forming rows in a table.

        Example: suppose you want red to increase from 0 to 1 over
        the bottom half, green to do the same over the middle half,
        and blue over the top half.  Then you would use::

            cdict = {'red':   [(0.0,  0.0, 0.0),
                               (0.5,  1.0, 1.0),
                               (1.0,  1.0, 1.0)],

                     'green': [(0.0,  0.0, 0.0),
                               (0.25, 0.0, 0.0),
                               (0.75, 1.0, 1.0),
                               (1.0,  1.0, 1.0)],

                     'blue':  [(0.0,  0.0, 0.0),
                               (0.5,  0.0, 0.0),
                               (1.0,  1.0, 1.0)]}

        Each row in the table for a given color is a sequence of
        *x*, *y0*, *y1* tuples.  In each sequence, *x* must increase
        monotonically from 0 to 1.  For any input value *z* falling
        between *x[i]* and *x[i+1]*, the output value of a given color
        will be linearly interpolated between *y1[i]* and *y0[i+1]*::

            row i:   x  y0  y1
                           /
                          /
            row i+1: x  y0  y1

        Hence y0 in the first row and y1 in the last row are never used.


        .. seealso::

            :meth:`LinearSegmentedColormap.from_list`
               Static method; factory function for generating a
               smoothly-varying LinearSegmentedColormap.

            :func:`makeMappingArray`
               For information about making a mapping array.
        N(R�t
monochromeR�R�t_segmentdatat_gamma(R�R�tsegmentdataR�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�`s/		cCs�tj|jddftj�|_t|j|jd|j�|jdd�df<t|j|jd|j�|jdd�df<t|j|jd|j�|jdd�d	f<t|_	|j
�dS(
NiiRri����iR5iRi(R�tonesR�R�RR�RRR�R�R(R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR��s%	)	)	)	cCs||_|j�dS(sA
        Set a new gamma value and regenerate color map.
        N(RR�(R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt	set_gamma�s	c	Cs?tj|�std��ntj|d�rpt|d�dkrptj|d�rpt|�\}}ntjddt|��}tdgdgdg�}x�t||�D]r\}}t	j
|�\}}	}
|dj|||f�|dj||	|	f�|dj||
|
f�q�Wt||||�S(	sT
        Make a linear segmented colormap with *name* from a sequence
        of *colors* which evenly transitions from colors[0] at val=0
        to colors[-1] at val=1.  *N* is the number of rgb quantization
        levels.
        Alternatively, a list of (value, color) tuples can be given
        to divide the range unevenly.
        scolors must be iterableiigg�?RrR5R(
R�R�R�R�R�tzipR�R�tdictR�R�tappendR(R�R�R�R�tvalstcdictR�R�R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt	from_list�s)(R�R�R�R�R�R!tstaticmethodR'(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyRYs5		tListedColormapcBs&eZdZddd�Zd�ZRS(s�Colormap object generated from a list of colors.

    This may be most useful when indexing directly into a colormap,
    but it can also be used to generate special colormaps for ordinary
    mapping.
    R'cCs8||_t|_|dkr0t|j�}n�tj|j�ra|jg||_t|_n�tj|j�r�t	|j�|_t|j�dkr�t|_nt|j�|kr�t	|j�||_n|j|3n@yt
|j�}Wntk
rnX|g||_t|_tj
|||�dS(su
        Make a colormap from a list of colors.

        *colors*
            a list of matplotlib color specifications,
            or an equivalent Nx3 floating point array (*N* rgb values)
        *name*
            a string to identify the colormap
        *N*
            the number of entries in the map.  The default is *None*,
            in which case there is one colormap entry for each
            element in the list of colors.  If::

                N < len(colors)

            the list will be truncated at *N*.  If::

                N > len(colors)

            the list will be extended by repetition.
        iN(R�R�RR�R�R�R�R�R�tlistR�R�R�R�(R�R�R�R�R4((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR��s*		

	cCs�tjg|jD]}tj|�^qtj�}tj|jddftj�|_||jdd�dd�f<d|jdd�df<t	|_
|j�dS(Niii����i����i(R�R�R�R�R�R�R�R�RR�R�R(R�R�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR��s	+%	N(R�R�R�R�R�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR)�s.t	NormalizecBsPeZdZdded�Zdd�Zd�Zd�Zd�Z	d�Z
RS(s2
    Normalize a given value to the 0-1 range
    cCs||_||_||_dS(s�
        If *vmin* or *vmax* is not given, they are taken from the input's
        minimum and maximum value respectively.  If *clip* is *True* and
        the given value falls outside the range, the returned value
        will be 0 or 1, whichever is closer. Returns 0 if::

            vmin==vmax

        Works with scalars or arrays, including masked arrays.  If
        *clip* is *True*, masked values are set to 1; otherwise they
        remain masked.  Clipping silently defeats the purpose of setting
        the over, under, and masked colors in the colormap, so it is
        likely to lead to surprises; therefore the default is
        *clip* = *False*.
        N(tvmintvmaxR�(R�R,R-R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�s		c	CsO|dkr|j}ntj|�rKd}tj|�jtj�}n$d}tj	|g�jtj�}|j
|�|j|j}}||kr�t
d��n�||kr�d|}not|�}t|�}|r tj|�}tj	tj|j|�||�d|�}n||||}|dkrK|d}n|S(NR�R�s/minvalue must be less than or equal to maxvaluegtmaski(R�R�R�R�RR�RR�R�R�tautoscale_NoneR,R-R�R�R�(	R�tvalueR�RR�R,R-R�R.((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyRs.

$
cCs{|j�std��nt|j�}t|j�}tj|�rgtj|�}||||S||||SdS(NsNot invertible until scaled(	tscaledR�R�R,R-R�R�RR�(R�R0R,R-R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytinverse9scCs(tj|�|_tj|�|_dS(s8
        Set *vmin*, *vmax* to min, max of *A*.
        N(RRR,RR-(R�tA((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt	autoscaleEscCsL|jdkr$tj|�|_n|jdkrHtj|�|_ndS(s( autoscale only None-valued vmin or vmaxN(R,R�RRR-R(R�R3((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR/LscCs|jdk	o|jdk	S(s return true if vmin and vmax setN(R,R�R-(R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR1QsN(R�R�R�R�R�R�RR2R4R/R1(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR+s			tLogNormcBs5eZdZdd�Zd�Zd�Zd�ZRS(sA
    Normalize a given value to the 0-1 range on a log scale
    c	Cs�|dkr|j}ntj|�rKd}tj|�jtj�}n$d}tj	|g�jtj�}tj
|ddt�}|j|�|j
|j}}||kr�td��n�|dkr�td��n�||kr�d|}n{|r;tj|�}tj	tj|j|�||�d|�}ntj|�tj|�tj|�tj|�}|dkr�|d}n|S(	NR�R�iR�s/minvalue must be less than or equal to maxvaluesvalues must all be positivegR.(R�R�R�R�RR�RR�R�R�tmasked_less_equalR�R/R,R-R�R�R�tlog(	R�R0R�RR�R,R-R�R.((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyRYs0

$6
cCs}|j�std��n|j|j}}tj|�rdtj|�}|tj|||�S|t	|||�SdS(NsNot invertible until scaled(
R1R�R,R-R�R�RR�tpowertpow(R�R0R,R-R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR2xscCs@tj|ddt�}tj|�|_tj|�|_dS(s8
        Set *vmin*, *vmax* to min, max of *A*.
        iR�N(RR6R�RR,RR-(R�R3((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR4�scCs�|jdk	r"|jdk	r"dStj|ddt�}|jdkr^tj|�|_n|jdkr�tj|�|_ndS(s( autoscale only None-valued vmin or vmaxNiR�(R,R�R-RR6R�RR(R�R3((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR/�sN(R�R�R�R�RR2R4R/(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR5Us
		tBoundaryNormcBs/eZdZed�Zdd�Zd�ZRS(s�
    Generate a colormap index based on discrete intervals.

    Unlike :class:`Normalize` or :class:`LogNorm`,
    :class:`BoundaryNorm` maps values to integers instead of to the
    interval 0-1.

    Mapping to the 0-1 interval could have been done via
    piece-wise linear interpolation, but using integers seems
    simpler, and reduces the number of conversions back and forth
    between integer and floating point.
    cCs||_|d|_|d|_tj|�|_t|j�|_||_|jd|jkrrt	|_
n	t|_
dS(s�
        *boundaries*
            a monotonically increasing sequence
        *ncolors*
            number of colors in the colormap to be used

        If::

            b[i] <= v < b[i+1]

        then v is mapped to color j;
        as i varies from 0 to len(boundaries)-2,
        j goes from 0 to ncolors-1.

        Out-of-range values are mapped to -1 if low and ncolors
        if high; these are converted to valid indices by
        :meth:`Colormap.__call__` .
        ii����iN(R�R,R-R�R�t
boundariesR�R�tNcmapR�t_interpR�(R�R;tncolorsR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR��s	

	c	CsZ|dkr|j}ntj|�}tj|�}|j|jd�}|rntj||j|j�ntj	|j
dtj�}x-t|j
�D]\}}||||k<q�W|jr�|t|jd�|jdjtj�}nd|||jk<|j|||jk<tj|d|�}|j
dkrV|rVt|�}n|S(NiR�ii����R.((R�R�RR�tgetmaskarrayR�R-R�R,R�R�tint16R�R;R=R�R<R�RR�R�(	R�R�R�R.txxtiretR�R�tret((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�s$	1cCs
td�S(NsBoundaryNorm is not invertible(R�(R�R0((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR2�sN(R�R�R�R�R�R�RR2(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR:�stNoNormcBs#eZdZdd�Zd�ZRS(s�
    Dummy replacement for Normalize, for the case where we
    want to use indices directly in a
    :class:`~matplotlib.cm.ScalarMappable` .
    cCs|S(N((R�R0R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�scCs|S(N((R�R0((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR2�sN(R�R�R�R�RR2(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyRD�scCs�tj|�}|jd�}|jd�}||}d||dk<|dd�dd�df|k}||df||df||||df<|dd�dd�df|k}d||df||df||||df<|dd�dd�df|k}d||df||df||||df<|dd�dd�dfdd	|dd�dd�df<||dd�dd�df<||dd�dd�df<|S(
sq
    convert rgb values in a numpy array to hsv values
    input and output arrays should have shape (M,N,3)
    i����iNiig@g@g@g�?(R�t
empty_likeRtptp(tarrR�tarr_maxtdeltaR�tidx((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt
rgb_to_hsv�s
%0%4%4@cCs�|dd�dd�df}|dd�dd�df}|dd�dd�df}tj|�}tj|�}tj|�}|djtj�}|d|}|d|}	|d||}
|d|d|}|ddk}||||<||||<|	|||<|dk}|
|||<||||<|	|||<|dk}|	|||<||||<||||<|dk}|	|||<|
|||<||||<|d	k}||||<|	|||<||||<|d
k}||||<|	|||<|
|||<|dk}||||<||||<||||<tj|�}
||
dd�dd�df<||
dd�dd�df<||
dd�dd�df<|
S(so
    convert hsv values in a numpy array to rgb values
    both input and output arrays have shape (M,N,3)
    Niiig@g�?iiii(R�RERR�(thsvthR�tvR�R�R�R�R�tptqttRJR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt
hsv_to_rgbsXtLightSourcecBs>eZdZddddddd�Zd�Zdd�ZRS(	s9
    Create a light source coming from the specified azimuth and elevation.
    Angles are in degrees, with the azimuth measured
    clockwise from north and elevation up from the zero plane of the surface.
    The :meth:`shade` is used to produce rgb values for a shaded relief image
    given a data array.
    i;i-iicCs:||_||_||_||_||_||_dS(s�
       Specify the azimuth (measured clockwise from south) and altitude
       (measured up from the plane of the surface) of the light source
       in degrees.

       The color of the resulting image will be darkened
       by moving the (s,v) values (in hsv colorspace) toward
       (hsv_min_sat, hsv_min_val) in the shaded regions, or
       lightened by sliding (s,v) toward
       (hsv_max_sat hsv_max_val) in regions that are illuminated.
       The default extremes are chose so that completely shaded points
       are nearly black (s = 1, v = 0) and completely illuminated points
       are nearly white (s = 0, v = 1).
       N(tazdegtaltdegthsv_min_valthsv_max_valthsv_min_satthsv_max_sat(R�RTRURVRWRXRY((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR�&s					cCsh|||j�|j�|j��}|j|d|�}||dd�dd�dd�f<|S(sE
        Take the input data array, convert to HSV values in the
        given colormap, then adjust those color values
        to given the impression of a shaded relief map with a
        specified light source.
        RGBA values are returned, which can then be used to
        plot the shaded image with imshow.
        t	elevationNii(RRt	shade_rgb(R�R�tcmaptrgb0trgb1((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pytshade=s
*%g�?cCso|jtjd}|jtjd}tj|�\}}dtjtjtj||��}tj||�}	tj|�tj|�tj	|�tj	|�tj	||	dtj�}
|
|
j
�|
j�|
j
�}
d|
d|}
t|dd�dd�dd�f�}tj
tjtj|dd�dd�df�d	k|
dk�d|
|dd�dd�df|
|j|dd�dd�df�|dd�dd�df<tj
|
dkd|
|dd�dd�d
f|
|j|dd�dd�d
f�|dd�dd�d
f<tj
tjtj|dd�dd�df�d	k|
dk�d|
|dd�dd�df|
|j|dd�dd�df�|dd�dd�df<tj
|
dkd|
|dd�dd�d
f|
|j|dd�dd�d
f�|dd�dd�d
f<tj
|dd�dd�dd�fdkd|dd�dd�dd�f�|dd�dd�dd�f<tj
|dd�dd�dd�fdkd|dd�dd�dd�f�|dd�dd�dd�f<t|�S(s�
        Take the input RGB array (ny*nx*3) adjust their color values
        to given the impression of a shaded relief map with a
        specified light source using the elevation (ny*nx).
        A new RGB array ((ny*nx*3)) is returned.
        g�f@g�?g@g�?Niiig�����|�=ig(RTR�tpiRUtgradienttarctanthypottarctan2tsintcosRRRKtwheretlogical_andtabsRYRWRXRVRR(R�R�RZtfractiontaztalttdxtdytslopetaspectt	intensityRL((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyR[Ls*&8$+Cj3FCj3Fxx(R�R�R�R�R_R[(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyRSs
	((((*R�tretnumpyR�Rtmatplotlib.cbookR�t__version__tsplittpartstmapR�tNP_MAJORtNP_MINORRR�titemsR�RNtfindtreplaceR�R�tcompileR�R�R�R�R�R�RR)R+R5R:RDt	normalizetno_normRKRRtobjectRS(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/colors.pyt<module>2sT
				�	=�l?Q@C