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.27k stars 590 forks source link

Select_box not working as expected? #824

Open rieder opened 4 years ago

rieder commented 4 years ago

Hi,

I am trying to plot a specific region, by selecting it with select_box. However, this seems to be completely ignored by the plot command.

Below is a minimal example of what doesn't seem to work. Expected is a plot of a small region, outcome is a plot of all particles.

import vaex

foc_x = -1951.7
foc_y = -1605.8
df = vaex.open('gas-0200.hdf5')

df.select_box(['x', 'y'], [(foc_x-1, foc_x+1), (foc_y-1, foc_y+1)])

df.plot(
    [["x", "y"]],
)
JovanVeljanoski commented 4 years ago

Hi Steven,

you probably need to do

df.plot(.., selection=True)

So that the selection is applied. Or perhaps you are already doing that (but not shown in the example above?)

rieder commented 4 years ago

Thanks, that seems to be one step forward. Far fewer particles are now plotted. However, the range of the axes doesn't yet seem right. Should I adjust these manually?

rieder commented 4 years ago

Also, is it possible to have the 'shape' keyword reflect the number of bins in the plot rather than in the dataset?