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 ? Programmation Python
Les compléments
Voir le programme détaillé
Module « matplotlib.pyplot »

Fonction xkcd - module matplotlib.pyplot

Signature de la fonction xkcd

def xkcd(scale: 'float' = 1, length: 'float' = 100, randomness: 'float' = 2) -> 'ExitStack' 

Description

help(matplotlib.pyplot.xkcd)

Turn on `xkcd <https://xkcd.com/>`_ sketch-style drawing mode.

This will only have an effect on things drawn after this function is called.

For best results, install the `xkcd script <https://github.com/ipython/xkcd-font/>`_
font; xkcd fonts are not packaged with Matplotlib.

Parameters
----------
scale : float, optional
    The amplitude of the wiggle perpendicular to the source line.
length : float, optional
    The length of the wiggle along the line.
randomness : float, optional
    The scale factor by which the length is shrunken or expanded.

Notes
-----
This function works by a number of rcParams, so it will probably
override others you have set before.

If you want the effects of this function to be temporary, it can
be used as a context manager, for example::

    with plt.xkcd():
        # This figure will be in XKCD-style
        fig1 = plt.figure()
        # ...

    # This figure will be in regular style
    fig2 = plt.figure()


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé