6 TH Lab Program
6 TH Lab Program
Matplotlib.
import matplotlib.pyplot as plt
# Sample data
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
# Create a linear plot
plt.plot(x, y, marker='o', color='blue', linestyle='--')
# Add labels and title
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Linear Plot Example')
# Show the plot
plt.grid(True)
plt.show()