Introduction aux modèles linéaires en Python
Jason Vestuto
Data Scientist
import matplotlib.pyplot as plt
plt.plot(x, y, 'r-o')
plt.show()

# Importer le module pyplot
import matplotlib.pyplot as plt
# Créer les objets figure et axe
fig, axis = plt.subplots()
# Préparer les options de style initiales
options = dict(marker='o', color='blue')
# Appeler la méthode plot sur l'objet axe
line = axis.plot(x, y, **options)
# Modifier l'objet axe avec les méthodes set
_ = axis.set_ylabel('Temps')
_ = axis.set_xlabel('Distances')
# Afficher la figure
plt.show()
(x1,y1) = (0,0)(x2,y2) = (2,3)dy = (y2 - y1) = 3 - 0dx = (x2 - x1) = 2 - 0slope = dy/dx = 3/2x=0 : y1 = 0
Introduction aux modèles linéaires en Python