Skip to content

Instantly share code, notes, and snippets.

@sam-lb
Last active May 29, 2021 14:11
Show Gist options
  • Save sam-lb/ecd1bdd75e64102ee811649266bcdfec to your computer and use it in GitHub Desktop.
Save sam-lb/ecd1bdd75e64102ee811649266bcdfec to your computer and use it in GitHub Desktop.
# plot of u/ShinyGrezz's thing on r/math
# http://sambrunacini.com
import pyperclip
import numpy as np
import matplotlib.pyplot as plt
from desmos_list_convert import to_desmos_table
# desmos_list_convert is at
# https://gist.github.com/sam-lb/fb1337c7e22c4a66f17cf4ee594baea3
X = np.linspace(1, 10, 1000)
Y = X.copy()
for i in range(100):
Y = np.sqrt(Y) + X
plt.title("thing from reddit (100 iterations)")
plt.xlabel("x")
plt.ylabel("y")
plt.plot(X, Y)
plt.show()
pyperclip.copy(to_desmos_table(zip(X, Y)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment