scikit-hep / histbook

Versatile, high-performance histogram toolkit for Numpy.
BSD 3-Clause "New" or "Revised" License
109 stars 9 forks source link

[feature request]: 2D plots #15

Closed kreczko closed 6 years ago

kreczko commented 6 years ago

Following up on the comment made on https://stackoverflow.com/questions/50820894/filling-numpy-arrays-slower-than-for-loop-h-fill-vs-h-fill-numpy: It would be good to replicate 2D plots that are common in HEP like the on http://histogrammar.org/docs/tutorials/python-matplotlib/ image

Vega-lite has a scatter plot as well as a heatmap (and table binned heatmap):

imandr commented 6 years ago

I was just about to create a request for 2D plots ... :) So let me second this one.

jpivarski commented 6 years ago

It's in the enhancements branch. Try it out and let me know if it's missing anything.

I haven't done the 2D export to ROOT yet, though.

jpivarski commented 6 years ago

Oh, the new method is Hist.heatmap() or Hist.heatmap("x", "y"). The documentation won't propagate through to readthedocs until I merge enhancements to master.