import matplotlib.pyplot as plt from matplotlib import cm import math import numpy as np # langages de programmation y_labels = [ 'C++', 'Ruby', 'Python', 'Php' ] # x_values indique sur l'axe des x où on doit situer # la barre verticale x_values = [ 1, 2, 3, 4 ] # y_values représentent les données associées à chaque langage y_values = [ 20, 10, 30, 15 ] plt.bar(x=x_values, height=y_values, width=0.9, color='#7788aa', tick_label = y_labels) plt.savefig('img/plot_bar_chart.png') plt.show()