-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
enh(bokeh): Inspect timeseries #6479
base: inspect
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## inspect #6479 +/- ##
===========================================
- Coverage 88.79% 88.79% -0.01%
===========================================
Files 323 323
Lines 68885 68887 +2
===========================================
+ Hits 61166 61167 +1
- Misses 7719 7720 +1 ☔ View full report in Codecov by Sentry. |
if array.shape[-1] == 1: | ||
array = array.squeeze() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because it would give different colors for a single category. I am not sure if it's worth it, to be honest, but I was a bit confused by the different colors with and without a selector.
Code
import datashader as ds
import numpy as np
import pandas as pd
import holoviews as hv
from holoviews.operation.datashader import datashade, dynspread, rasterize
hv.extension("bokeh")
num = 10000
seed = np.random.default_rng(1)
df = pd.DataFrame({"x": np.arange(num), "y": seed.normal(0, 1, num).cumsum(), "val": 1, "cat": "c0"})
curve = hv.Curve(df)
agg_fn = ds.by("cat", ds.count(self_intersect=False))
p0 = datashade(curve, aggregator=agg_fn, line_width=10, selector=None)
p1 = datashade(curve, aggregator=agg_fn, line_width=10, selector=ds.min("val"))
p0 + p1
Before | After |
---|---|
![]() |
![]() |
Disabling the
overlay_aggregate
fastpath when we have aselector
. A bit of formatting in theapplies
as it was pretty complicated already.Code