cplot icon indicating copy to clipboard operation
cplot copied to clipboard

Wrong visualization with Jupyter Notebook and ipympl

Open Davide-sd opened this issue 3 years ago • 1 comments

When creating multiple plots inside a Jupyter Notebook with ipympl and %matplotlib widget, the first plot look ok, the second will be overlay-ed to the first and so on...

%matplotlib widget
import numpy as np
import cplot
cplot.plot(
    lambda z: np.sin(z**3) / z,
    (-2, 2, 400),
    (-2, 2, 400),
).show()

Figure 1(1)

cplot.plot(
    lambda z: z**6 + 1,
    (-2, 2, 400),
    (-2, 2, 400),
).show()

Figure 1(2)

Davide-sd avatar Feb 18 '22 17:02 Davide-sd

I think that's normal mpl behavior, at least cplot doesn't do anything special. (I don't think.)

nschloe avatar Feb 18 '22 17:02 nschloe