Graph paper, coordinates, points, lines, labels and legends.
Have you ever looked at a graph and wondered how a computer draws it? What exactly are the x-axis and y-axis? How do numbers turn into a point, a line, a bar chart or a scientific visualization?
Welcome to Matplotlib: 0 to Infinity from Programmer's Picnic. This new free, 19-level course starts at real zero โ one point on graph paper โ and gradually teaches practical visualization using Python.
Champuter helps explain Python code and teaches the lesson aloud. On supported Learn With Champak blog pages, use Champuter's Explain, Run in Editor and Visualize in Editor tools beside Python code. The real Python runs in our Super Editor; Champuter helps you follow the steps and understand what the chart means.
Start learning with ChamputerOpen Python Super EditorWe begin by learning that the point (2, 3) means travel two units right and three units up. That's all you need to understand your first chart.
import matplotlib.pyplot as plt
plt.plot(2, 3, marker='o')
plt.xlim(0, 5)
plt.ylim(0, 5)
plt.grid(True)
plt.show()
Try it: Change plt.plot(2, 3, marker='o') to plt.plot(4, 1, marker='o'). Predict where the dot moves before you run the program.
import matplotlib.pyplot as plt
days = [1, 2, 3, 4]
visitors = [12, 18, 16, 25]
plt.plot(days, visitors, marker='o')
plt.title('Visitors by Day')
plt.xlabel('Day')
plt.ylabel('Visitors')
plt.grid(True)
plt.show()
You can change the numbers and watch the chart respond. Champuter can explain the imports, variables and plotting statements.
Graph paper, coordinates, points, lines, labels and legends.
Bar charts, scatter plots, histograms and pie charts.
Subplots, annotations, uncertainty and box plots.
Saving images, NumPy, Pandas, heatmaps and advanced projects.
Create a student marks analyzer, shop sales dashboard, daily temperature plot, exercise progress tracker and scientific report. Practice predicting each chart, changing its data and explaining what your changes reveal.
Follow the full interactive course and use our Python Super Editor for every example. Champuter helps you learn at your own pace.
๐ Complete course ยท 19 levels๐ Run Python code๐ See Champuter demo๐ป View course on GitHubA Programmer's Picnic lesson by Learn With Champak. Start with one dot. Finish by telling stories with data.