Created
December 27, 2016 03:35
-
-
Save Goddard/fdd0b455877e8905eb13e6d469f269ae to your computer and use it in GitHub Desktop.
This file contains 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 | |
def graph(formula, x_range): | |
x = np.array(x_range) | |
y = formula(x) | |
plt.plot(x, y) | |
plt.show() | |
def my_formula(x): | |
return (x % 6)**2 % 7 - np.sin(x) | |
graph(my_formula, range(1, 100)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment