Skip to content

Plot running slow when many points are displayed #741

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

Closed
ifll opened this issue Jul 13, 2016 · 3 comments
Closed

Plot running slow when many points are displayed #741

ifll opened this issue Jul 13, 2016 · 3 comments

Comments

@ifll
Copy link

ifll commented Jul 13, 2016

I have noticed that the more points you are displaying in a scatterplot the more computing power it requires to interact with the plot, and there could appear some lagging while using plotly...

In my case I have to plot over 50k points in a scatter plot, which makes it necessary not to be so "laggy"...

Is there any solution to increase the performance of the plot?

i have realised that when I hover my cursor over an area from the plot with high point density (lets say 10000 points per cm2) it is more "laggy" than when I hover the mouse in an area with lower point density (100 points per cm2). At the time I am hovering the mouse over there is some information which appears on the "text" field of the marker. Is there any way to fire this option only at the moment that the cursor is steady for "X" seconds instead of always? (I guess that with this solution plotly would run much smoother, as it would only refresh the information when the cursor is steady and not always)

If anyone have any other ideas on how to plot over 50k points in a scatter plot with plotly and make them run smooth please help me.

Thank you

@etpinard
Copy link
Contributor

Thanks for writing in.

In my case I have to plot over 50k points in a scatter plot, which makes it necessary not to be so "laggy"...

Yep. That's an known issue, mainly cause by our svg implementation.

Is there any solution to increase the performance of the plot?

Use the scattergl trace type which is designed for large datasets. See example with 1 million points: http://codepen.io/etpinard/pen/XXrzBe

Is there any way to fire this option only at the moment that the cursor is steady for "X" seconds instead of always?

You can try different values of the HOVERMINTIME constant we use to determine the delay between calls to the pick-on-hover routine. Note that this constant isn't configurable via the API; you'll have to build your own plotly.js bundle in order to use custom values.


@ifll I'm going to close this issue as it is mostly an implementation question. Please use our community forums for questions of the likes in the future.

@ifll
Copy link
Author

ifll commented Jul 14, 2016

Thank you very much Etienne! I will try to implement all this to see how it looks like!

sorry for having posted here, I didn't know there was a forum to ask questions about this.

@ifll
Copy link
Author

ifll commented Jul 14, 2016

Is there the possibility to have "click" events on the "scattergl" plot type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants