

You just need to take same-length arrays in a pair. To plot a curve, in this code example, we will use plot() function. Let us cover basic plotting that uses pylab module: Example using pylab module: The basic syntax to import the pylab module is given below: from pylab import * NOTE: Pylab conflicts with all sorts of built-in functions in Python, so it is abandoned and is not used much. It is a very convenient module as this module helps in importing matplotlib.pyplot (for the plotting) and NumPy (for the mathematics and working with arrays) in bulk in a single namespace.

This module gets installed alongside the Matplotlib Likewise, matplotlib.pyplot is a module in the Matplotlib package. This module provides a procedural interface to the Matplotlib object-oriented plotting library. This module mainly helps in bringing functions and classes from pyplot and NumPy into the global namespace which then becomes easier for the Matlab users. In this tutorial, we will cover the Pylab module in Matplotlib.
