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

Disable Datashader count aggregator self-intersect by default for curves #5975

Closed
droumis opened this issue Nov 2, 2023 · 2 comments · Fixed by #6030
Closed

Disable Datashader count aggregator self-intersect by default for curves #5975

droumis opened this issue Nov 2, 2023 · 2 comments · Fixed by #6030
Assignees
Labels
TRIAGE Needs triaging

Comments

@droumis
Copy link
Member

droumis commented Nov 2, 2023

Describe the solution you'd like

The self-intersect option for a Datashader count aggregator controls whether pixel-crossings of the same line contribute toward a pixel's count.

It was decided that a more reasonable default behavior would be to disable self-intersect by default.

This only makes sense for curves, not paths; self-intersections of paths are usually valuable information.

Additional context


import pandas as pd
import numpy as np
import holoviews as hv
from holoviews.operation.datashader import rasterize
import datashader as ds

hv.extension('bokeh')

self_intersect = True
n_samples = 1000
data = np.random.randn(n_samples)
df = pd.DataFrame({'time': np.arange(len(data)), 'value': data})

hv_curve = rasterize(hv.Curve(df, 'time', 'value'), aggregator=ds.count(self_intersect=self_intersect)).opts(width=600)

hvplot_curve = df.hvplot.line('time', 'value', rasterize=True, aggregator=ds.count(self_intersect=self_intersect))

hv_curve + hvplot_curve

Screen.Recording.2023-11-02.at.4.56.59.PM.mov
@droumis droumis added the TRIAGE Needs triaging label Nov 2, 2023
@droumis droumis changed the title Disable Datashader count aggregator self-intersect by default Disable Datashader count aggregator self-intersect by default for curves Nov 2, 2023
@droumis
Copy link
Member Author

droumis commented Nov 3, 2023

Also, in the video in the description, it appears that there remains some gradient in the line even when self-intersect = False. Is that right? If self-intersections are not counted and there is only one line, then all the counts should be the same and therefore I would expect only a single hue

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
TRIAGE Needs triaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant