In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

In [2]:
avar_hists = np.load('hist_is_avar.npy')
avar_hists_ub = np.load('hist_ub_avar.npy')
L = len(avar_hists)

In [6]:
mc_hists = np.array([np.load('hist_mc_%d.npy'%i) for i in xrange(20)])
mc_hists_ub = np.load('hist_ub_c.npy')
print np.shape(mc_hists_ub)


(0,)

In [4]:
fig,axes = plt.subplots(4,5,figsize=(12,10))
axf = np.array(axes).flatten()
for i,ax in enumerate(axf):
    ah = avar_hists[i]
    ah /= np.sum(ah)
    mch = mc_hists[i]
    mch /= np.sum(mch)
    ax.plot(ah,c='C0',label='avar')
#     ax.plot(mch,c='C1',label='main')
plt.legend()

for i,ax in enumerate(axf):
    ah = avar_hists_ub[i]
    ah /= np.sum(ah)
    mch = mc_hists_ub[i]
    mch /= np.sum(mch)
    ax.plot(ah,c='C2',label='avar',linestyle='dotted')
#     ax.plot(mch,c='C3',label='main',linestyle='dotted')
plt.legend()


---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-4-b67bcdbd4eb2> in <module>()
     13     ah = avar_hists_ub[i]
     14     ah /= np.sum(ah)
---> 15     mch = mc_hists_ub[i]
     16     mch /= np.sum(mch)
     17     ax.plot(ah,c='C2',label='avar',linestyle='dotted')

IndexError: index 0 is out of bounds for axis 0 with size 0

In [ ]:


In [ ]: