All Matplotlib figures are showing up blank or empty in my Jupyter notebooks.
Code works (for other people); produces no errors.
Reviewed questions here and here.
Restarted Kernels (in multiple notebooks).
Confirmed that Matplotlib is installed via command prompt in Python:
>>> import matplotlib
>>> matplotlib.__version__
'3.1.1'
For reference, I am also running:
- Python (3.7.4)
- Windows 10 Home (Version 10.0.18362, Build 18362)
- Chrome (Version 79.0.3945.130, Official Build, 64-bit)
- JupyterLab extension loaded from Anaconda3 installation
This is happening in all my jupyter notebooks, and saving any figs to .png also saves blank .png files.
Created a simple test bar chart with the following code, which produces a blank interactive figure:
%matplotlib notebook
import matplotlib.pyplot as plt
import numpy as np
users = [1000, 2000, 3000, 4000, 5000]
x_axis = np.arange(len(users))
x_axis
fig, ax = plt.subplots()
ax.bar(x_axis, users, color='r', alpha=0.5, align="edge")
The resulting interactive fig does show a "Figure 1" gray interactive bar at the top, and also states the following string at the bottom (since there is no ;
at the end of the code):
<BarContainer object of 5 artists>
Not interested in switching to matplotlib inline (wish to keep interactive notebooks).
Any thoughts on how to resolve this blank figures issue please? TIA!