Plotting Line Chart - Python Mathplotlib Module

Plotting Line Chart - Python Mathplotlib Module

Instructor-svg Al-Mamun Sarkar
Apr 02 , 2020

Plotting Line Chart - Python Mathplotlib Module. The following code shows how to plot a line chart using pyplot of matplotlib module.

 

Import module:

import matplotlib.pyplot as plt

Create Data:

x = [10, 25, 30]
y = [30, 60, 40]

Plot chart:

plt.plot(x, y)
plt.show()

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram