Open thomasaarholt opened 3 years ago
Is this the same root cause as https://github.com/matplotlib/matplotlib/issues/19116?
It may be. Just in case that this hint could we of help: when using the ipympl the issue seems to be more prominent than with the notebook backend.
It looks to me that this is a different issue from matplotlib/matplotlib#19116, because the latter is related to the use of blitting for the webagg backends, and it has been disabled in https://github.com/matplotlib/matplotlib/pull/19762.
The following example works fine in the jupyter notebook but not the jupyterlab, both with the ipympl backend (matplotlib 3.4.2 and ipympl 0.7):
%matplotlib widget
import matplotlib.pyplot as plt
from matplotlib.widgets import RectangleSelector
import numpy as np
values = np.arange(100)
fig = plt.figure()
ax = fig.add_subplot()
ax.plot(values)
span = RectangleSelector(ax, print, interactive=True)
# flush events to get a first draw of the figure before setting the extents
fig.canvas.flush_events()
span.extents = (26, 55, 32, 71)
Describe the issue
The plots tear heavily when using interactive rois after creating a new environment (
conda create --name testplot ipympl matplotlib jupyterlab
).First noticed in hyperspy/hyperspy#2706, it appears to be a problem with both mpl 3.3/3.4 and ipympl 0.6/0.7.
This matplotlib interactive example results in the following output, both with
useblit=True
and=False
.Versions