r/IPython • u/AcidHead996 • Jun 03 '18
Animate points in two numpy arrays with matplotlib
hi,
i have two numpy arrays X and Y with same length describing a circumference. The points are created with a function that takes as inputs the radius and the number of points i want and return the already mentioned X and Y arrays.
i want a animation to show 1 pair of points at the time but i have not being able to achieve this using matplotlib. i would show my animation code but truly is useless garbage. Can you guys please point me in the right direction on how to make this work?
Thanks.
3
Upvotes
2
u/NomadNella Jun 03 '18
The code below is an animation example (source). It shows the first of the two examples and I added two lines first importing HTML and then displaying the plot as an HTML5 video. With the latest Notebook this was the only way I could display it. Otherwise, the best I got is a static image.
2
u/[deleted] Jun 03 '18
show your code.
2
u/auraham Jun 05 '18
Maybe this tutorial can help you.