Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Chris Burr
    @chrisburr
    Jim posted some examples higher up in this chat (Feb 27 15:49)
    Michael Hedges
    @mhedges
    Thanks. This would be the equivalent of histtype='step' in matplotlib.pyplot, right?
    Chris Burr
    @chrisburr
    Yup though the best way to do it for a already binned histogram data is less obvious
    Michael Hedges
    @mhedges
    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
    Nicholas Smith
    @nsmith-
    feel free to add material to https://github.com/nsmith-/mpl-hep/blob/master/binder/gallery.ipynb (I can add you to the repo if you don't want to fork)
    Michael Hedges
    @mhedges
    Thanks. I'm fine with a fork
    Nicholas Smith
    @nsmith-
    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
    Nicholas Smith
    @nsmith-
    Hi all, I'll be giving a short presentation about this subject tomorrow: https://indico.cern.ch/event/803122/ Anyone have input they'd like to see mentioned?
    Henry Schreiner
    @henryiii
    Today’s IRIS-HEP topical meeting may be of interest, it’s over mpl-hep and histograms.
    Chris Tunnell
    @tunnell
    @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
    Nicholas Smith
    @nsmith-
    yes, indeed we would like to find any changes to matplotlib that would make things easier
    Lina Alasfar
    @alasfar-lina
    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
    I tried for example to adapt Box Histograms to mpl:
    https://github.com/alasfar-lina/box_is2d
    Hans Dembinski
    @HDembinski
    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
    Replacing typuv
    Typical ROOT plots with matplotlib equivalents. The first step is to identify "typical" plots, like your 2d box plot.
    Andrzej Novak
    @andrzejnovak
    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 :)
    Nicholas Smith
    @nsmith-
    :D
    Hans Dembinski
    @HDembinski
    Cool!
    Andrzej Novak
    @andrzejnovak
    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 ?
    Hans Dembinski
    @HDembinski
    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