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 ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Classe « Axes »

Méthode matplotlib.pyplot.Axes.streamplot

Signature de la méthode streamplot

def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, transform=None, zorder=None, start_points=None, maxlength=4.0, integration_direction='both', broken_streamlines=True, *, data=None) 

Description

help(Axes.streamplot)

Draw streamlines of a vector flow.

Parameters
----------
x, y : 1D/2D arrays
    Evenly spaced strictly increasing arrays to make a grid.  If 2D, all
    rows of *x* must be equal and all columns of *y* must be equal; i.e.,
    they must be as if generated by ``np.meshgrid(x_1d, y_1d)``.
u, v : 2D arrays
    *x* and *y*-velocities. The number of rows and columns must match
    the length of *y* and *x*, respectively.
density : float or (float, float)
    Controls the closeness of streamlines. When ``density = 1``, the domain
    is divided into a 30x30 grid. *density* linearly scales this grid.
    Each cell in the grid can have, at most, one traversing streamline.
    For different densities in each direction, use a tuple
    (density_x, density_y).
linewidth : float or 2D array
    The width of the streamlines. With a 2D array the line width can be
    varied across the grid. The array must have the same shape as *u*
    and *v*.
color : :mpltype:`color` or 2D array
    The streamline color. If given an array, its values are converted to
    colors using *cmap* and *norm*.  The array must have the same shape
    as *u* and *v*.
cmap, norm
    Data normalization and colormapping parameters for *color*; only used
    if *color* is an array of floats. See `~.Axes.imshow` for a detailed
    description.
arrowsize : float
    Scaling factor for the arrow size.
arrowstyle : str
    Arrow style specification.
    See `~matplotlib.patches.FancyArrowPatch`.
minlength : float
    Minimum length of streamline in axes coordinates.
start_points : (N, 2) array
    Coordinates of starting points for the streamlines in data coordinates
    (the same coordinates as the *x* and *y* arrays).
zorder : float
    The zorder of the streamlines and arrows.
    Artists with lower zorder values are drawn first.
maxlength : float
    Maximum length of streamline in axes coordinates.
integration_direction : {'forward', 'backward', 'both'}, default: 'both'
    Integrate the streamline in forward, backward or both directions.
data : indexable object, optional
    If given, the following parameters also accept a string ``s``, which is
    interpreted as ``data[s]`` if ``s`` is a key in ``data``:

    *x*, *y*, *u*, *v*, *start_points*
broken_streamlines : boolean, default: True
    If False, forces streamlines to continue until they
    leave the plot domain.  If True, they may be terminated if they
    come too close to another streamline.

Returns
-------
StreamplotSet
    Container object with attributes

    - ``lines``: `.LineCollection` of streamlines

    - ``arrows``: `.PatchCollection` containing `.FancyArrowPatch`
      objects representing the arrows half-way along streamlines.

    This container will probably change in the future to allow changes
    to the colormap, alpha, etc. for both lines and arrows, but these
    changes should be backward compatible.


Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé