-
-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Labels
Description
Hello.
The ipykernel version 7.0+ prevents qtconsole+matplotlib to display a window with a graph.
Steps to reproduce:
- open a terminal and launch the qtconsole
jupyter qtconsole
- Within the qtconsole run commands
%matplotlib qt
import numpy as np
import matplotlib.pyplot as plt
xx = np.linspace(-np.pi, np.pi, 500)
yy = np.sin(2.0**xx)
plt.plot(xx,yy)
The last command produces a "string" output, but doesn't create a window with the graph.
3. Then, run command
plt.show(block=True)
And a window with the graph will be displayed.
In version 6.30.1 plt.plot
on step 2 will display a window with the graph.
Used packages:
$ pacman -Qs qtconsole
local/python-qtconsole 5.7.0-1
Qt-based console for Jupyter with support for rich media output
$ pacman -Qs ipykernel
local/python-ipykernel 7.0.1-1
The ipython kernel for Jupyter
I thought that maybe the issue was related to #1450, but the proposed fix there didn't change anything. The issue might be related to #1442, though. For now, the only workaround is either downgrading the ipykernel to 6.30.1 or explicitly running plt.show(block=True)
.