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