Skip to content

Instantly share code, notes, and snippets.

@bhishanpdl
Created August 29, 2018 12:21
Show Gist options
  • Save bhishanpdl/e4a883478e0650878890dfbdb56cfef0 to your computer and use it in GitHub Desktop.
Save bhishanpdl/e4a883478e0650878890dfbdb56cfef0 to your computer and use it in GitHub Desktop.
[clear plot] #plot #matplotlib
t = np.linspace(0, 5*np.pi, 501) # Define parameter for parametric plot.
plt.plot(t, np.sin(t)**2) # Generate plot.
plt.plot(t, np.sin(t)**3) # Create new plot on same axes.
ax = plt.gca() # Gain control of axes.
ax.hold(False) # Turn hold off.
plt.plot(t, np.sin(t)**4) # Create new plot; old data erased.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment