- Pyroom
- Tutorials
- Python libraries
- Plot a chart with matplotlib
Plot a chart with matplotlib
matplotlib turns lists of numbers into charts. The chart appears in the preview panel next to the console.
Intermediate Video coming soon. The steps below show everything the video will cover.
Steps
- Load matplotlib from Library settings first. It is bigger, so the first load takes a moment.
- Make two lists: the labels and the values.
- plt.bar draws the bars and plt.show displays the chart.
- Run it. The chart appears in the preview panel.
Read the transcript
Load matplotlib from Library settings first. It is bigger, so the first load takes a moment.
Make two lists: the labels and the values.
plt.bar draws the bars and plt.show displays the chart.
Run it. The chart appears in the preview panel.
More Python libraries tutorials
- Turn on a Python library like numpy · Beginner