import matplotlib.pyplot as plt fig, ax = plt.subplots() x = ["Äpfel", "Birnen", "Bananen", "Ananas"] y = [3, 7, 8, 10] plt.bar(x, y) plt.xlabel('Früchte') plt.ylabel('Beliebtheit') plt.title('Früchte und deren Beliebtheit') fig