Nexus Learn

Log in · Create free account

Module 5: Charts with matplotlib · 8 min

Choosing the right chart

QuestionChartmatplotlib call
Compare categoriesBar chartplt.bar(x, y)
Change over timeLine chartplt.plot(x, y)
Relationship between two numbersScatter plotplt.scatter(x, y)
Spread of one numberHistogramplt.hist(values)

Pie charts are hard to read when there are more than 3 or 4 slices. A sorted bar chart is usually clearer.

(free account needed to save progress)

← Your first chart  |  Making charts clear and honest →