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

Answered By
3 Likes