CoffeaTeam / coffea-casa-tutorials

Coffea tutorials and examples tested on coffea-casa AF.
9 stars 11 forks source link

Thq analysis tutorial is broken on plotting part #7

Closed oshadura closed 3 years ago

oshadura commented 3 years ago
Three Lepton Channel

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-cf15275e713f> in <module>
      2 fig, ax = plt.subplots(1)
      3 ax.set_prop_cycle(cycler(color=colors))
----> 4 hist.plot1d(output['lll_3rdLepton_pT'], overlay=overlay, stack=stack, ax=ax, clear=clear, fill_opts=fill_opts)
      5 ax.set_ylim(0, None)
      6 ax.legend()

TypeError: tuple indices must be integers or slices, not str
mat-adamec commented 3 years ago

This was an issue because I turned on savemetrics, which I used to have turned off. This made the output of the processor class a list of dictionaries, rather than a dictionary, and thus an extra call to the list had to be introduced.

I fixed it in both analysis-casa.ipynb and analysis-casa-benchmarking.ipynb with 3920b0e.