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.

Add a python way to schedule purely js animations

See original GitHub issue

Add a python construct that scripts running animations that are purely done in javascript. This way static examples can be built that have animations.

maybe something like this

N = 80
x = np.linspace(0, 4*np.pi, N)

y = np.sin(x)
y2 = np.tan(x)
y3 = np.cos(x)

y_possibilities = [y,y2,y3]

l = line(x,y, color="#0000FF", tools="pan,zoom,resize")

animate(animate.select(y_posibilities), delay="3s", line)

that is a very very rough syntax. But something like that should produce a bokeh object that every 3 seconds switches out the y data range to one of the other possibilities.

Issue Analytics

  • State:open
  • Created 10 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Lnk2pastcommented, Nov 22, 2021

Any chance I could help support this? Has there been any progress on this feature? I am currently doing something hackish with panel/hvplot to animate some basic transitions, but would love to have this in bokeh out of the box. I will request an invite to the dev slack when I am home later if that is a more appropriate place to discuss.

0reactions
pzwangcommented, Apr 19, 2017

After a chat with Bryan, we have come to some resolution about how to handle events and model updates while the plot is animating. Namely, we should add some kind of deep “event system disable” that flags that the entire plot is “transitioning”, so while the JS-side model may be updating with values, it does not trigger callbacks or other “data model” changes until the final state is reached. Any new data events coming in are queued up. User interactions (mouse, kbd, etc.) are ignored while transitioning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create Animations in Python?
Plot X and Y using plot() function. Add pause() function with suitable time interval; Run the program and you'll see the animation.
Read more >
receive data from a python program to animate an object ...
There are basically 2 ways to do it. Pooling - To put it simply it comes down to browser asking server "Do you...
Read more >
A First Look at PyScript: Python in the Web Browser
You'll leverage browser APIs and JavaScript libraries to build rich, ... in the browser and allows users to add Python logic in a...
Read more >
Animation - freeCodeCamp.org
How to Add Interactive Animations and Page Transitions to a Next.js Web App with Framer Motion · Colby Fayock 2 years ago. How...
Read more >
How to build a game with HTML, CSS, and JavaScript
In the script.js file, create a function called jump() that adds the "animate" class ...
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