Unit 42 | Getting to Know Other Plot Types |
In addition to contour and image plots, pyplot supports a variety of more conventional plot types: bar plots, box plots, histograms, pie charts, line plots, log and log-log plots, scatter plots, polar plots, step plots, and so on. The online pyplot gallery[37] offers many examples, and the following table lists many of the pyplot plotting functions.
Plot type | Function |
---|---|
Vertical bar plot | bar |
Horizontal bar plot | barh |
Box plot with “whiskers” | boxplot |
Errorbar plot | errorbar |
Histogram (can be vertical or horizontal) | hist |
Log-log plot | loglog |
Log plot in X | semilogx |
Log plot in Y | semilogy |
Pie chart | pie |
Line plot | plot |
Date plot | plot_dates |
Polar plot | polar |
Scatter plot (size and color of dots can be controlled) ... |
Get Data Science Essentials in Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.