Think the outline of a bar chart (i.e. no vertical bars between each bin) were the edges always go to zero
Jim posted some examples higher up in this chat (Feb 27 15:49)
Thanks. This would be the equivalent of histtype='step' in matplotlib.pyplot, right?
Yup though the best way to do it for a already binned histogram data is less obvious
Plotting pre-binned data in mpl is simple, but is only obvious in hindsight (I posted a solution to this in the PyHEP channel). I am personally not opinionated about whether using the weights argument for this purpose is good enough, but I use it regularly and have never had any problems with it
I should add this to the readme, but the goal here is to develop a strawman via 1) making a gallery of HEP examples in mpl; 2) find the minimal set of interface tools to make things eaiser and write a spec; 3) implement the spec in this package
@nsmith- copied from pyhep room: You're also collecting a list of proposed changes to mpl more generally, right? If so, I might ping our colleagues to see where they think the mpl shortcoming are. I'm not sure how informative it is for you, but I can screen share you through the Python code behind dark matter publications to get an idea of what people do. Only if it's educational/useful. Oh, wait, there is mpl-hep room... should talk there
I have tried rootpy and I think it has the issue that one needs to have ROOT installed, and know ROOT. This might not be an issue for experimentalists, but theoreticians typically do not interact much with root. But would have root/hepmc files generated by some MC generator or taken from experimentalists . The other issue with rootpy, is it treats root objects as ROOT objects, whilst it is favourable to have them as bumpy objects when some analysis is desired before plotting. uproot provides that and it is possible to plot histograms for example using packages like Pyik .
I would like to see some improvements in this direction. Like stacked histograms and TGCut..etc
Hi Lina, you should use uproot to read ROOT files. It works great and you don't need ROOT installed. For HepMC you can use pyhepmc from scikit-hep, search on github for scikit-hep and pyhepmc. In this channel we mostly talk about
Typical ROOT plots with matplotlib equivalents. The first step is to identify "typical" plots, like your 2d box plot.
This is now live and ported to scikit-het https://github.com/scikit-hep/mplhep I will continue adding functionality as needed, but it would be great if you would want to contribute new methods with examples :)
Do people have thoughts on changing the interface so that mplhep would directly modify the mpl pyplot and axis classes, so that one would no longer import both mplhep and matplotlib, but just do import mplhep.pyplot as plt which would work just like matplotlib .pyplot except it would include our histplot functions ?
If you do this by inheriting pyplot, why not. In my little toolset https://github.com/hdembinski/pyik, I just use pyplot internally in the plotting commands, which are free-standing functions.
Inheriting from pyplot seems a bit more elegant than this