Figure and Text Cannot Be Output in the Same Cell

已回答

I tried using the following code:

import matplotlib.pyplot as plt

plt.figure(figsize=(6, 3))
plt.imshow([[1, 2], [2, 3]])
plt.show()

print("done")

I found that only "done" was output.

 

 

After removing plt.show(), only the figure was displayed, while the text did not appear. 

 

Is this a bug? Please help me!

1

Indeed this is a bug on 2025.3.2 – https://youtrack.jetbrains.com/issue/PY-87207/Jupyter-Notebook-doesnt-show-output-of-run-after-PyCharm-updated-to-2025.3.2

We are planning to release the hotfix in 2025.3.2.1 which should be coming in the next week.

0

Please speed up your hot fix. This bug makes it impossible to work properly with Jupyter notebooks. How could anybody work with them as before, when now the output cells are incomplete, either showing a plot or the text output, whichever part was triggered last, but not the full, correct output of the cell?

0

请先登录再写评论。