I am running the example on ipympl homepage in a jupyter notebook in pycharm:

%matplotlib ipympl
import matplotlib.pyplot as plt
import numpy as np

fig, ax = plt.subplots()
x = np.linspace(0, 2*np.pi, 100)
y = np.sin(3*x)
ax.plot(x, y)

And I am not getting interactive toolbar buttons. I have tried the following.

  1. Without ipympl I am getting a static plot, not interactive.
  2. Using ipympl, I am getting still a static plot, but it looks different to the one without ipympl.
  3. Using Qt5Agg as backend without ipympl, I am not getting plots at all
  4. Using Qt5Agg and ipympl, I get a poped up window for the plot, but that window is stuck, without content.

This is with ipympl:

With ipympl

This is without ipympl:

Without ipympl

Using Qt5Agg as backend without ipympl

# %matplotlib ipympl
import matplotlib
matplotlib.use('Qt5Agg')

enter image description here

Using Qt5Agg and ipympl

%matplotlib ipympl
import matplotlib
matplotlib.use('Qt5Agg')

enter image description here

In none of the cases is there interactive navigation bar or buttons. I am not sure if this is a pycharm problem, or my matplotlib versions (tried 3.4.0 3.5.0 3.8.1) or something else.

0

There are 0 best solutions below