Robotics & Artificial Intelligence

Write a Python program to demonstrate the use of the Matplotlib library.

Python Modules

1 Like

Answer

import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
plt.plot(x, y)
plt.xlabel('x')
plt.ylabel('y')
plt.title('Line Plot')
plt.show()

Output

Write a Python program to demonstrate the use of the Matplotlib library. Modules and Packages in Python, KIPS ICSE Robotics & Artificial Intelligence Solutions Class 9.

Answered By

1 Like


Related Questions