Visualizing data in Matplotlib
matplotlib
is a data visualization library for creating static and interactive visualizations in Python. It contains a wide variety of visual options, such as line charts, bar charts, histograms, and many more. It is built on NumPy
arrays. matplotlib
is a low-level API that provides flexibility for both simple and complex visuals. However, this also means that achieving simple tasks can be quite cumbersome.
The pyplot
module within matplotlib
handles visualization needs. Some important concepts we will typically encounter while using the matplotlib
library include the following:
- Figure: This is the frame within which graphs are plotted. Simply put, the figure is where the plotting is done.
- Axes: These are the horizontal and vertical lines (x and y axes) that provide the border for the graph and act as a reference for measurement.
- Ticks: These are the small lines that help us demarcate our axes.
- Title: This is the title of our graph...