ম্যাটপ্লটলিব FuncAnimation
🌈ম্যাটপ্লটলিব FuncAnimation কি?
📋ম্যাটপ্লটলিব FuncAnimation হলো ফাংশনের মাধ্যমে অ্যানিমেশন তৈরি করার পদ্ধতি।
⚒️ম্যাটপ্লটলিব FuncAnimation ফাংশনের মাধ্যমে অ্যানিমেশন তৈরি করতে ব্যবহৃত হয়।
ম্যাটপ্লটলিব FuncAnimation ফাংশনের মাধ্যমে অ্যানিমেশন তৈরি করার উদাহরণ।
matplotlib
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
figure, axes = plt.subplots()
line, = axes.plot([], [])
def update(frame):
line.set_data(
[1, 2, 3, frame],
[2, 4, 6, frame]
)
return line,
animation = FuncAnimation(
figure,
update,
frames=10,
interval=200
)
plt.show()