📝 Worksheet← Lesson
BitWithBite
Computational Mathematics · Quick Reference

Mathematical Visualization Cheat Sheet

Computational Mathematics · Lesson 5/6
In one line: turning numbers and equations into pictures — graphs, plots, and charts — often reveals patterns and insights that raw numbers alone can hide.

Key Ideas

1Why Visualize Math. A well-made graph can reveal trends, outliers, and relationships far faster than scanning a table of numbers.
2Line Plots. Show how a value changes continuously, ideal for functions like y=sin(x) or a dataset changing over time.
3Scatter Plots. Show individual data points without connecting them, ideal for spotting correlation or clusters between two variables.
4Bar Charts and Histograms. Bar charts compare categories; histograms show the distribution of a single numeric variable by grouping values into bins.
5Common Plotting Tools. Python's matplotlib is the most widely used plotting library; plt.plot() draws line plots, plt.scatter() draws scatter plots, and plt.hist() draws histograms.

Worked Examples

You want to plot y=x^2 for x from -5 to 5. What type of plot is most appropriate?
A line plot (using plt.plot())
You have exam scores for 100 students and want to see the distribution. What type of plot is best?
A histogram (using plt.hist())
You want to check if there's a relationship between study hours and exam scores for 50 students. What plot type is best?
A scatter plot (using plt.scatter())

Formulas

plt.plot(x, y) draws a line plot
plt.scatter(x, y) draws a scatter plot
plt.hist(data) draws a histogram

Practice Yourself

What plot type is best for showing a continuous function like y=sin(x)?
A line plot
What plot type is best for comparing sales across 5 different products?
A bar chart
What plot type shows the distribution of a single numeric variable?
A histogram