In [21]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
import seaborn as sns
sns.set()

In [55]:
n = 200
np.random.seed(42)
myr = np.random.randn(n)
mys = 50*np.random.randint(10, size=n)
x = np.linspace(-2, 2, num=n)
plt.subplot(121)
plt.scatter(x, myr, mys, alpha=0.7)
plt.scatter(myr, x, mys, alpha=0.7, c='r')
plt.subplot(122)
plt.hist(myr)


Out[55]:
(array([  1.,   7.,  23.,  32.,  39.,  51.,  27.,  13.,   4.,   3.]),
 array([-2.6197451 , -2.08575368, -1.55176225, -1.01777082, -0.4837794 ,
         0.05021203,  0.58420346,  1.11819489,  1.65218631,  2.18617774,
         2.72016917]),
 <a list of 10 Patch objects>)

In [52]:
plt.plot(x, np.exp(-x**2), label='Artwork')
plt.scatter(x, np.exp(-(x)**2) + myr/50, label='Major Artwork')
#plt.scatter(x, np.exp(-(np.random.standard_normal(50))**2))
plt.legend(loc='best')


Out[52]:
<matplotlib.legend.Legend at 0x2b958076e780>

In [ ]: