Skip to content

Instantly share code, notes, and snippets.

@juanshishido
Created November 7, 2015 05:42
Show Gist options
  • Save juanshishido/e14209aaa26b96b756ee to your computer and use it in GitHub Desktop.
Save juanshishido/e14209aaa26b96b756ee to your computer and use it in GitHub Desktop.
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
plt.style.use('ggplot')
np.random.seed(1868)
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.xticks(fontsize=7)
plt.yticks(fontsize=7)
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