背景:本地win10 pycharm连接远程ubuntu 16.04进行python开发
代码:简单的一段显示图形的代码
import matplotlib.pyplot as plt
...
plt.hist(errors, num_bins)
plt.xticks(np.arange(min_v, max_v + d, d), rotation=90)
# 设置网格
plt.grid()
plt.show()
...
等了好半天不出来图像,然后报错。
报错:
File "/home/user/show_plot.py", line 166, in show_errors
plt.hist(errors, num_bins)
File "/home/user/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2637, in hist
return gca().hist(
File "/home/user/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 926, in gca
return gcf().gca(**kwargs)
File "/home/user/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 603, in gcf
return figure()
File "/home/user/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 545, in figure
**