Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- x = np.linspace(0, 2, 100)
- plt.plot(x, x, label='x')
- plt.plot(x, x**2, label='$x^2$')
- plt.plot(x, x**3, label='x^3')
- plt.xlabel('x label')
- plt.ylabel('y label')
- plt.title("Simple Plot")
- plt.legend()
- plt.show()
- x = np.linspace(0, 2, 10)
- plt.plot(x, x, label='x')
- plt.plot(x, x**2, 'ro', label='$x^2$')
- plt.plot(x, x**3, label='x^3')
- plt.xlabel('x label')
- plt.ylabel('y label')
- plt.title("Simple Plot")
- plt.legend()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement