8000 Use unbinned values as input to `histplot` · Issue #511 · scikit-hep/mplhep · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Use unbinned values as input to histplot #511
@JamesJieranShen

Description

@JamesJieranShen

Hello! Thanks for creating this great library (along with uproot, awkward, and many others!).

In my daily workflow, I have found many of the features provided by histplot to be extremely useful. However, I find myself using this as a replacement to plt.hist a lot when it comes to simple histograms. However, I would have to create this in two separate steps, first binning the values with np.histogram, and then feed the output to histplot. It would be great if I can directly pass an array of values and have histplot create a nice histogram, with the proper mplhep styling and features.

In short, I am looking for something like

hep.histplot(values, bins=100, range=(0, 200), yerr=True, color='k')

Does something like this already exist? If not, I think this would be a great feature to add. As far as I can tell, implementing something like this would simply involve calling np.histogram and then histplot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0