When I run any plot-related code in a Jupyter notebook the kernel hangs.
When I run code like this, the plot does not appear and the kernel hangs. So like this:
import matplotlib.pyplot as plt # <--- runs OK
fig = plt.figure() # <--- Kernel crashes
I get the message: "The kernel appears to have died. It will restart automatically."
- Other code, not involving plotting, runs OK.
- My Jupyter notebook is managed via Anaconda.
- I'm using the Linux environment on a Chromebook (if that's relevant).
- Jupyter was working fine when I last used it about a month ago, so I don't know what's changed.
- I've tried deleting and re-installing the Linux environment on the Chromebook, then doing a fresh install of Anaconda. I thought this the nuclear option, but it gives the same issue.
- It does not appear to be related to this issue: After conda update, python kernel crashes when matplotlib is used
- It MAY be similar to this (unanswered) issue, but can't be sure: Jupyter Notebook matplotlib causes "kernel appears to have died"
I am not well-versed on how these things work so simple instructions would be appreciated!