import matplotlib.pyplot as plt

from mousestyles.data import distances_bystrain


threshold = 0.1
numbins = 30
xlim = [0, 40]
col = 'blue'
verbose = False
step = 50

plt.style.use('ggplot')
plt.style.use('seaborn-notebook')

# Extract strain data
dist_strain = list(np.load('distances.npy'))

# Plot
fig = plt.figure(1)
fig.subplots_adjust(hspace=.6)
nb_plots = strain
for i, s in enumerate(dist_strain):
    index_plot = nb_plots * 100 + 10 + i + 1
    plt.subplot(index_plot)
    plt.hist(s, numbins, normed=1, facecolor=col, alpha=0.5, range=xlim)
    plt.ylabel('Density')
    plt.title('strain %s' % i)
plt.xlabel('Distance (cm)')
plt.show()

@@ -24,16 +24,35 @@
 t as plt
+%0Aimport numpy as np
 %0A%0Afrom m
@@ -155,34 +155,8 @@
 lue'
-%0Averbose = False%0Astep = 50
 %0A%0Apl
@@ -349,22 +349,32 @@
 plots = 
+len(dist_
 strain
+)
 %0Afor i, 

Fix bug