Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter is reset on changing color, size, x, y #134

Closed
abast opened this issue Jun 10, 2024 · 2 comments
Closed

filter is reset on changing color, size, x, y #134

abast opened this issue Jun 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@abast
Copy link

abast commented Jun 10, 2024

Create scatter plot with random data:

data = pd.DataFrame({
    "x": np.random.rand(1000),
    "y": np.random.rand(1000),
    "z": np.random.rand(1000),
})

scatter = Scatter(data=data, x="x", y="y")
scatter.filter()
scatter.show()

Show only points for which x > 0.5

indices = list(data[data['x']>0.5].index)
scatter.filter(indices)

Each of the following lines resets the selection:

scatter.color(by = 'z')
scatter.size(by = 'z')
scatter.x('y')
scatter.y('x')
@flekschas
Copy link
Owner

Thanks for reporting the issue. This seems to be a bug in regl-scatterplot. I'm investigating

@flekschas
Copy link
Owner

Fixed in 5dbceff and released as v0.16.1.

Screen.Recording.2024-06-11.at.9.39.25.AM.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants