my problem is close to an issue discussed here Fix saving animations to transparent formats by QuLogic · Pull Request #29024 · matplotlib/matplotlib · GitHub . It’s an alpha blending rather than the movie being transparent.
I use this MWE in VSCODE 1.96 with the a jupyter notebook
%pylab widget
fig, ax = plt.subplots(figsize=(2, 2), dpi=int(240 / 2), facecolor='white')
resolution = 400
x = np.linspace(-300, 300, resolution)
y = np.linspace(-300, 300, resolution)
X, Y = np.meshgrid(x, y)
R = np.sqrt(X**2 + Y**2) # Compute radial distances
# Preallocate the pixel map
pixel_map = np.zeros_like(R)
alpha_map = np.ones_like(R) * 0.1
#alpha_map[R < 50] = 1
cmap = plt.cm.plasma
im = ax.imshow(pixel_map, cmap=cmap, alpha=alpha_map, extent=[-300, 300, -300, 300], origin='lower')
im.set_alpha(alpha_map)
def animate(frame):
alpha_map[R < frame * 3] = 1
im.set_alpha(alpha_map)
return im
ani = FuncAnimation(fig, animate, frames=100, interval=3, blit=True, repeat=False)
ani.save('test.mov', writer='ffmpeg', savefig_kwargs=dict(transparent=True, facecolor='none'))
plt.show()
Here is what I see in vscode
Here is what I see when playing with QuickTime
The above image I also only see if I drag it large enough.
I’ve also tried doing various flag for FFMPEG.

