Mathématiques・Cryptographie・QuantiqueComment dessiner des graphiques avec Python (matplotlib.pyplot)Ce dont vous avez besoinCompte GoogleÉtapesAccédez à https://colab.research.google.com/Sélectionnez “Fichier” -> “Nouveau notebook”Collez et exécutez le code ci-dessous1 2 3 4 5 6 7 import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 2*np.pi, 500) plt.plot(x, np.sin(x), label="sin curve") plt.plot(x, np.cos(x), label="cos curve") plt.legend() # Afficher la légende plt.show() Résultat de l’exécutionRéférencesmatplotlib.pyplot — Matplotlib 3.5.3 documentation