Created
April 4, 2020 11:15
-
-
Save yaojenkuo/f9ecd69b04df8d8af1426a2d04522130 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| x = np.linspace(0, 2*np.pi) | |
| y = np.sin(x) | |
| plt.plot(x, y) | |
| plt.title("$y = sin(x)$") | |
| plt.xlabel("x") | |
| plt.ylabel("y") | |
| plt.xticks([0, np.pi, 2*np.pi],['0', '$\pi$', '$2\pi$']) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment