From 2fe5df51b40a97ae7ff621759a05f6f0494ba69d Mon Sep 17 00:00:00 2001 From: Nils Tesdal <nils.tesdal@ntnu.no> Date: Tue, 17 Apr 2018 15:51:55 +0200 Subject: [PATCH] Update intro.py --- intro.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intro.py b/intro.py index f676b36..b3fe536 100644 --- a/intro.py +++ b/intro.py @@ -5,7 +5,10 @@ from matplotlib import pyplot as plt # display simple bar-chart -plt.bar(['A', 'B', 'C'], [2, 6, 5], 0.9) +x = range(3) +y = [2, 6, 5] +plt.bar(x, y, 0.9) +plt.xticks(x, ('A', 'B', 'C')) plt.show() # Read csv-file from disk into dataframe object -- GitLab