Skip to content

Instantly share code, notes, and snippets.

@yaojenkuo
Created April 4, 2020 11:15
Show Gist options
  • Select an option

  • Save yaojenkuo/f9ecd69b04df8d8af1426a2d04522130 to your computer and use it in GitHub Desktop.

Select an option

Save yaojenkuo/f9ecd69b04df8d8af1426a2d04522130 to your computer and use it in GitHub Desktop.
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