question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

a version of .newPlot that does the .update logic behind the scenes

See original GitHub issue

In Dash, I’d like the Graph component to do smart restyle and relayout updates when I call newPlot or plot (or some new method). Dash users deal with figures and not diffs.

Programming this logic myself is a lot of work that other groups could benefit from if it was done centrally in plotly.js. I wrote a lot of the logic in the workspace and it took a while to work through all the kinks. Some of the edge cases included:

  • calling newPlot instead of update at the start
  • calling addTraces manually instead of update
  • calling newPlot instead of update when switching between 2D, 3D, or ternary
  • calling newPlot when switching to a financial chart type
  • deleting cartesian axes when swithing to ternary or mapbox

Here is that code

This would form the basis of a plotly.js React component.

Dash users will benefit from this immediately with:

  • Faster updates enabling their apps to refresh every 50ms and mimic live-streaming
  • Mapbox updates with full map redraws

Ideally, this logic would work its way into a robust .animate method as well (.animate method that can handle any type of figure diff #1849)


cc @rreusser @alexcjohnson @etpinard @cpsievert @monfera @jackparmer

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
etpinardcommented, Jul 4, 2017

I’d vote for adding a new Plotly method (roll the 🥁 ) Plotly.react(gd, fig).

1reaction
monferacommented, Jul 4, 2017

Arriving at the delta spec between two subsequent specs sounds similar to a DOM diffing algo. With Étienne’s Plotly.react it’d be black box to Dash / Python but internally, at least from some point onward, it’d be good to handle updates incrementally. The current Plotly.restyle calls occupy the middle ground, not granular enough for the fastest updates and not aggregate enough to allow full restatement of a plot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should You Update Logic Pro X? The Dos and Don'ts For a ...
Want more out of LPX? Supercharge Your Logic workflow with these Free Templates and Guides: ...
Read more >
Logic Pro release notes - Apple Support
Logic Pro release notes. Learn about the enhancements and improvements in the most recent versions of Logic Pro. Before updating Logic Pro, ...
Read more >
10 Logic Pro X 10.2.1 Features You Will Love
1 HERE. Generally with Logic Pro incremental updates, you know you will get some bug fixes and behind the scenes performance improvements and...
Read more >
See what's new in Apple's Logic Pro 10.7.5! - Ask.Audio
Apple's Logic Pro 10.7.5 is here with a FREE update filled with several new features and enhancements that users have been eagerly awaiting....
Read more >
Logic Pro X 10.5 deep dive: Live Loops, Drum Synth, more
The gigantic Logic Pro X 10.5 update revolutionizes the way users can ... All of your cells and scenes will remain in tempo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found