Skip to content

Version 7.0+ prevents qtconsole to show graphs #1454

@vp1981

Description

@vp1981

Hello.

The ipykernel version 7.0+ prevents qtconsole+matplotlib to display a window with a graph.

Steps to reproduce:

  1. open a terminal and launch the qtconsole
jupyter qtconsole
  1. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions