We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df2e438 commit e4df69eCopy full SHA for e4df69e
ev_counts.py
@@ -43,18 +43,16 @@
43
44
import matplotlib.pyplot as plt
45
46
-values = [counts[k] for k in sorted(list(counts.keys()))]
47
-plt.bar(sorted(list(counts.keys())), values,
48
- tick_label=sorted(list(counts.keys())))
+year_keys = sorted(list(counts.keys()))
+#print(year_keys)
+
49
+values = [counts[k] for k in year_keys]
50
+#print(values)
51
52
+plt.bar(year_keys, values, tick_label=year_keys)
53
plt.show()
54
55
# HUOM.! Jos saat ilmoituksen "serWarning: Matplotlib is
56
# currently using agg, which is a non-GUI backend, so
57
# cannot show the figure.", niin ratkaisu on
58
# asentaa Tkinter: `sudo apt-get install python3-tk`
-
59
60
0 commit comments