predict-idlab / plotly-resampler

Visualize large time series data with plotly.py
https://predict-idlab.github.io/plotly-resampler/latest
MIT License
1k stars 67 forks source link

Does this work with px.strip #229

Open mkleinbort-ic opened 1 year ago

mkleinbort-ic commented 1 year ago

I was excited to hear of plotly-resampler, as it seems to address my use-case very well.

However, I've been benchmarking this on some plotly figures that use px.strip - and I'm not seeing performance improvements.

Does plotly-resampler work with px.strip?

https://plotly.com/python/strip-charts/

mkleinbort-ic commented 1 year ago

Digging into it a bit, it seems px.strip uses the code for box-plots under the hood, specificaly the part that renders all the boxpoints

https://github.com/plotly/plotly.py/blob/696c30bf0131e8786a9dce050b772c1063550c6f/packages/python/plotly/plotly/express/_chart_types.py#L677

    return make_figure(
        args=locals(),
        constructor=go.Box,
        trace_patch=dict(
            boxpoints="all",
            pointpos=0,
            hoveron="points",
            fillcolor="rgba(255,255,255,0)",
            line={"color": "rgba(255,255,255,0)"},
            x0=" ",
            y0=" ",
        ),
        layout_patch=dict(boxmode=stripmode),
    )

image

I assumed this was using some for of px.scatter under the hood but now I'm not sure - but any thoughts about supporting this in plotly-resampler?

mkleinbort-ic commented 1 year ago

I see this was clarified in https://github.com/predict-idlab/plotly-resampler/issues/195

Any ambition to support other "scatter like" trace types?

jonasvdd commented 1 year ago

Hi @mkleinbort-ic,

Currently, we are exploring whether we will support the aggregation of candlestick traces :)