FuncAnimation shows no data points or animation in Mac OS

I am using PyCharm 2020.1 Professional version in iMac, macOS Catalina 10.15.4. The following animation example code (from Matplotlib's doc) produces no data points. The code runs without error but all I see is an empty plot. Can anyone help me here?

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

fig, ax = plt.subplots()
xdata, ydata = [], []
ln, = plt.plot([], [], 'ro')

def init():
ax.set_xlim(0, 2*np.pi)
ax.set_ylim(-1, 1)
return ln,

def update(frame):
ln.set_data(xdata, ydata)
return ln,

ani = FuncAnimation(fig, update, frames=np.linspace(0, 2*np.pi, 128),
init_func=init, blit=True)


Comment actions Permalink

I'm having the same issue


Comment actions Permalink


Unfortunately, it is not supported yet, please vote for this ticket


As a workaround, please disable "Show plots in tool window" under  Settings/Preferences |  Tools | Python Scientific. 


Please sign in to leave a comment.