vaexio / vaex

Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀
https://vaex.io
MIT License
8.28k stars 590 forks source link

[BUG-REPORT] vaex.viz.histogram data transposed #2142

Closed cega-000 closed 2 years ago

cega-000 commented 2 years ago

Description vaex.viz.histogram has an issue where the data appears to become transposed when choosing a list of selections.

Example Code import vaex as vx df = vx.example() df.viz.histogram("x", selection=[None,None], shape = 10) df.viz.histogram("x", selection=None, shape = 10)

Software information

JovanVeljanoski commented 2 years ago

Hey!

Strange.. I am not sure if the intent was to only ever have one selection.. but I attempted to add support for this as you requested. I do want @maartenbreddels to take a look at it just in case before merging. Feel free to experiment with the pull-request branch and provide feedback / improvements if you want!

Thank you!

arunpersaud commented 2 years ago

Hi

it would be great to have this supported. The documentation (guides-> plotting selection) show an example where multiple selections are used for a heatmap and I could also use it for 1D histograms. It seems to be already working when using df.count, which is what I am doing now. I see if I can try out the branch too

Thanks.

arunpersaud commented 2 years ago

I have some issues building from source, so I just downloaded the new mpl.py file from your branch and just replaced it in site-packages and it seems to work well! Would be great to get this merged... Already looking forward to the release which includes this :)

Thanks for the quick fix.

JovanVeljanoski commented 2 years ago

Hey, i just merged the fix - so you can install from master if you'd like that. For a release.. sometime 2nd half of august.. as we are on holidays :)