Skip to content

Cumulative scatter plots #3165

@mwouts

Description

@mwouts

Thanks for the beautiful and so helpful library!

I often plot cumulative returns, and would find it very helpful if the running sum was computed by plotly itself.

Below are a few pseudo examples with my expectations:

  • go.Scatter(x=[0,1,2,3], y=[1,2,3,4], accumulate=True) produces the same plot as go.Scatter(x=[0,1,2,3], y=[1,3,6,10]) (accumulated left to right, starting at first value)
  • go.Scatter(x=[0,1,2,3], y=[1,2,3,4], accumulate=True), when zoomed on x=[2,3] produces the same plot as go.Scatter(x=[2,3], y=[3,7])

Ideally, I would also like to be able to specify

  • the reference x coordinate for starting the accumulation: either a fixed x (clipped to the viewing window), left (minus infinity?) or right, the x center of the viewing window, etc...
  • an x/y series for the reference y level (was zero above). That would be useful to superimpose cumulative plots onto classical scatter lines.

I also found a similar question on the community site, but it does not seem to have led to an implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions