Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rc("savefig", dpi=200)
params = {'xtick.major.size' : 0,
'ytick.major.size' : 0}
for (k, v) in params.items():
plt.rcParams[k] = v'ggplot')
x = np.random.normal(0, 1, 20)
y = np.array([np.random.normal(v, 0.5) for v in x])
plt.scatter(x, y, s=35, alpha=0.85, color='#328E82')
plt.xlabel('$x$', fontsize=10)
plt.ylabel('$y$', fontsize=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment