# -*- coding: utf-8 -*- """ Created on Tue Mar 24 12:29:51 2020 @author: user """ # Creer un graphique representant concentration en function du temps import numpy as np import matplotlib.pyplot as plt # importer pyplot temps = [1, 2, 3, 4, 6, 7, 9] concentration = [5.5, 7.2, 11.8, 13.6, 19.1, 21.7, 29.4] plt.scatter(temps , concentration , marker ="o", color ="blue") plt.xlabel ("Temps (h)") plt.ylabel (" Concentration (mg/L)") plt.title(" Concentration de produit en fonction du temps") #Plot de la courbe y=2+3x et la sauvegarder dans un fichier x = np.linspace(min(temps), max(temps), 50) y = 2 + 3 * x plt.plot(x, y, color='green', ls="--") plt.grid() plt.savefig('concentration_vs_temps.png', bbox_inches='tight', dpi =200) plt.show()