Scientific view not working with Docker
Hello,
I can't get the scientific view (the "Plots" pane) to show any matplotlib plots when the Python interpreter is set to a Docker (in Settings/Project/Project Interpreter), it just shows nothing. It does work with a remote Python interpreter over SSH. Debugging works, as well as the "Data" pane. Any ideas what might be wrong? This is the code:
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
print(matplotlib.rcsetup.all_backends)
print(matplotlib.get_backend())
#%%
N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radii
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()
print("Done.")
It shows
1aa8ab59f251:python -u /opt/project/testplot.py
['GTK', 'GTKAgg', 'GTKCairo', 'MacOSX', 'Qt4Agg', 'Qt5Agg', 'TkAgg', 'WX', 'WXAgg', 'GTK3Cairo', 'GTK3Agg', 'WebAgg', 'nbAgg', 'agg', 'cairo', 'gdk', 'pdf', 'pgf', 'ps', 'svg', 'template']
module://backend_interagg
Done.
Process finished with exit code 0
Please sign in to leave a comment.
Forgot to mention that this is PyCharm 2018.1.2 Professional running under Windows 10 Pro with Docker for Windows 18.03.1-ce-win65. Python version is "Python 3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:39:56)". This is the Dockerfile: