Running a Simple Bar Chart in Python
In this post, we will look at how to run a simple bar chart in Python. We will use matplotlib. Here’s the code. We will display a chart with x-axis showing “team” data vs y-axis showing “score”: [sourcecode language=”Python”] import matplotlib.pyplot as plt team = (‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’) score = [9,2,5,4,8,6] plt.bar(team, score) plt.show() [/sourcecode] Let’s run this in Visual Studio Code. Save the code with a … Continue reading Running a Simple Bar Chart in Python