ع♡🇸🇴🇸🇦 :
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.patches import Rectangle
import numpy as np
flig, ax = plt.subplots(figsize=(8, 5))
flig.patch.set_facecolor("black")
ax.set_xlim(0, 10)
ax.set_ylim(0, 6)
ax.axis("off")
colors=[
"#f25022",
"#7fba00",
"#00a4ef",
"#ffb900",
]
position =[
(4, 3),
(5.1,3),
(4,1.9),
(5.1,1.9),
]
blocks = []
for color ,(x,y) in zip (colors , position):
rect =Rectangle (
(x, y),
1,
1,
color=color,
alpha=0
)
ax.add_patch(rect)
blocks.append(rect)
text = ax.text(
5,
1,
"Start Window 🪟",
color "white",
fontsize=20,
ha="center",
alpha=0
)
def update (frame)
for i, rect in enumerate (blocks):
delay = i * 15
if frame > delay:
alpha = min(
(frame - delay) / 30,
1
)
rect.set_alpha (alpha)
if frame > 60:
text.set_alpha(
min((frame - 60) / 30, 1)
)
return blocks + [text]
ani = FuncAnimation (
fig,
update,
frames = 150,
interval =30,
blit=True
)
plt.show()
python is a wonderful ❤️😳
2026-05-31 11:44:15