Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « Colormap »

Méthode matplotlib.pyplot.Colormap.__call__

Signature de la méthode __call__

def __call__(self, X, alpha=None, bytes=False) 

Description

help(Colormap.__call__)

Parameters
----------
X : float or int, `~numpy.ndarray` or scalar
    The data value(s) to convert to RGBA.
    For floats, *X* should be in the interval ``[0.0, 1.0]`` to
    return the RGBA values ``X*100`` percent along the Colormap line.
    For integers, *X* should be in the interval ``[0, Colormap.N)`` to
    return RGBA values *indexed* from the Colormap with index ``X``.
alpha : float or array-like or None
    Alpha must be a scalar between 0 and 1, a sequence of such
    floats with shape matching X, or None.
bytes : bool, default: False
    If False (default), the returned RGBA values will be floats in the
    interval ``[0, 1]`` otherwise they will be `numpy.uint8`\s in the
    interval ``[0, 255]``.

Returns
-------
Tuple of RGBA values if X is scalar, otherwise an array of
RGBA values with a shape of ``X.shape + (4, )``.


Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé