Skip to content

Instantly share code, notes, and snippets.

@kendallm
Created October 20, 2020 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kendallm/493f4876d66857e52c87241d51737cb5 to your computer and use it in GitHub Desktop.
Save kendallm/493f4876d66857e52c87241d51737cb5 to your computer and use it in GitHub Desktop.
Quickly plot a formula
import matplotlib.pyplot as plt
import numpy as np
import math
x = np.arange(1000)
y = np.log2(x)
plt.plot(x,y, label="log(x)")
plt.legend()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment