#๐Ÿ”’ Animating over multiple plots withmatplotlib

7 messages ยท Page 1 of 1 (latest)

lofty hatch
#

Hiya, sorry if i'm missing something ridiculously obvious, but i've tried googling to no avail!

I have a function that takes in a certain amount of parameters and plots it with plt.show() at the end of the function

How would I be able to run this function multiple times, with the plot/drawing showing an animation and switching between the graph states after a set time limit, all the while keeping the original plot function unchanged? Is this even possible to do or would I have to write a separate function specifically for the animation.

My best guess would be to store the plots somehow (in an array(?), and then iterate over those stored plots, though I'm unsure whether this is the right approach.

Cheers!

tough echoBOT
#

@lofty hatch

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

sour magnet
#

there is an animation object in matplotlib that will handle some interface buttons and stuff.

lofty hatch
#

!close

tough echoBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.