Plotting Graphs using Matplotlib.
In : BSc IT Subject : Programming in Pythonimport matplotlib.pyplot as plt
# Sample data
x = [1, 2, 3, 4, 5]
y = [2, 3, 5, 7, 11]
# Create a line plot
plt.plot(x, y, marker='o')
# Add titles and labels
plt.title('Simple Line Plot')
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
# Show the grid
plt.grid()
# Show the plot
plt.show()