Mis a jour le 2024-03-17, 13:2

Lineplot

Pour juste tracer une courbe : pyplot.plot([1, 2, 3, 4], [4, 8, 5, 4], linestyle = ':', marker = 'o', color = 'red', markersize = 10)
Pour tracer un ensemble de courbes à partir d'une matrice (ici, en fait un dataframe pandas) :
Exemple : df = pandas.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]}, index = ['a', 'b', 'c']) plts = pyplot.plot(df, marker = 'o') pyplot.legend(plts, df.columns)

Copyright python-simple.com
programmer en python, tutoriel python, graphes en python, Aymeric Duclert