Matplotlib is a Python visualization library that provides a variety of tools and functions for creating static, animated and interactive graphics and visualizations. pyplot is a module of the Matplotlib library that provides a simple and intuitive interface for creating plots. Specifically, the key points of this module are:
- High-level interface: pyplot offers a number of functionalities that facilitate the fast creation of graphs.
- Functionality: It offers a wide variety of functions for bar charts, dot plots, box plots, and so on.
- Integration: It is tightly integrated with environments such as Jupyter Notebook, allowing graphs to be displayed directly within notebooks.
The line plot represents information in points connected by lines. It is useful to show the evolution of one or more data series along an axis, typically time.
The scatter plot shows individual values of two numerical variables on a Cartesian plane (with two axes). Each point represents one observation.
The histogram represents the distribution of a numerical variable by dividing the range of data into intervals and showing how many data fall into each interval (for continuous variables) or the frequency of each category (for categorical variables).
The bar plot represents categorical data with rectangular bars with heights (or lengths, in the case of horizontal bars) proportional to the values they represent.
A pie chart represents data in circular sectors, where each sector corresponds to a category and its size is proportional to the value it represents.
A boxplot shows the distribution of quantitative data by its quartile and possibly outliers.