# pip install celluloid #%matplotlib qt from matplotlib import pyplot as plt from celluloid import Camera import numpy as np fig = plt.figure() camera = Camera(fig) t = np.linspace(0, 2 * np.pi, 128, endpoint=False) for i in range(0,41) : p=plt.plot(t, i*np.sin(t)) plt.legend(p, [f'line {i}']) camera.snap() animation = camera.animate() animation.save('ex356.gif', writer='PillowWriter', fps=12)
Recent Posts
- #448 Torque Peaking Due to Viscus Damper Deadband
- #447 Command *loadsize in tcl for HyperMesh
- #446 Mechanical vibrations of a material point
- #445 HyperMesh python script for renumbering the elements and nodes
- #444 How to suppress the message “This workbook contains links” and automatically select “Don’t Update” in VBA
- #443 Vibration Double Amplitude
- #442 The partial sums of the Fourier series for the square-wave function using python
- #441 Parametric curve Lemniscate of Bernoulli with Slider in python
- #440 Cycloid on interactive figure with widgets in python
- #439 Relative Accelerometer Displacement During Sine Vibration
Categories
- aerospace (1)
- aircraft (2)
- animation (14)
- aviation photos (1)
- awk (21)
- bash (15)
- batch (12)
- bioinformatics (2)
- buckling (4)
- C# (8)
- cluster (1)
- composites (4)
- differential equations (3)
- engineering (10)
- excel (2)
- fem (5)
- genetic algorithm (1)
- HyperMesh (48)
- HyperView (1)
- interpolation (1)
- iSight (1)
- Latex (2)
- linux (16)
- machine learning (3)
- math (7)
- matplotlib (33)
- mechanics (2)
- Monte Carlo (1)
- nastran (33)
- Nicholas Roerich (1)
- notepad++ (1)
- numerical (5)
- numpy (3)
- octave (1)
- optimization (17)
- OptiStruct (10)
- pandas (4)
- patran (3)
- perl (1)
- plot (25)
- powershell (1)
- pso (2)
- python (248)
- R (5)
- regexp (1)
- scipy (6)
- seaborn (15)
- sed (1)
- sklearn (1)
- strength of materials (7)
- tcl (86)
- tkinter (14)
- turtle (6)
- vba (3)
- vibration (5)
Archives
- October 2024 (1)
- September 2024 (2)
- August 2024 (2)
- July 2024 (11)
- June 2024 (3)
- May 2024 (10)
- April 2024 (2)
- February 2024 (5)
- January 2024 (14)
- December 2023 (2)
- November 2023 (3)
- September 2023 (4)
- August 2023 (18)
- July 2023 (17)
- June 2023 (6)
- May 2023 (4)
- April 2023 (1)
- March 2023 (2)
- February 2023 (1)
- January 2023 (12)
- December 2022 (7)
- November 2022 (11)
- October 2022 (9)
- September 2022 (6)
- August 2022 (6)
- June 2022 (6)
- May 2022 (4)
- April 2022 (5)
- March 2022 (4)
- February 2022 (7)
- January 2022 (35)
- December 2021 (5)
- November 2021 (40)
- October 2021 (7)
- September 2021 (5)
- August 2021 (1)
- June 2021 (3)
- May 2021 (2)
- March 2021 (1)
- February 2021 (11)
- January 2021 (10)
- December 2020 (2)
- November 2020 (12)
- October 2020 (2)
- September 2020 (33)
- August 2020 (5)
- July 2020 (2)
- June 2020 (6)
- May 2020 (19)
- April 2020 (1)
- March 2020 (2)
- February 2020 (2)
- January 2020 (1)
- October 2019 (1)
- August 2019 (2)
- July 2019 (2)
- March 2019 (3)
- February 2019 (10)
- January 2019 (42)
- December 2018 (23)
- December 2017 (1)
- December 2016 (3)
Recent Comments