Action environment
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.1.0
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
After changing the environment from Ubuntu 14.04 LTS to Ubuntu 16.04 LTS, the following Warning is displayed when drawing with Jupyter + Matplotlib.
/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py:403: UserWarning: matplotlib is currently using a non-GUI backend, so cannot show the figure
“matplotlib is currently using a non-GUI backend, “
% matplotlib inline
# sine curve learning
# Jul. 08, 2017
import numpy as np
import matplotlib.pyplot as plt
data1 = np.loadtxt('input.csv', delimiter=',')
#data2 = np.loadtxt('res.170708_0830.cut', delimiter=',')
data2 = np.loadtxt('res.170709_0900.cut', delimiter=',')
input1 = data1[:,0]
output1 = data1[:,1]
input2 = data2[:,0]
output2 = data2[:,1]
fig = plt.figure()
ax1 = fig.add_subplot(2,1,1)
ax2 = fig.add_subplot(2,1,2)
ax1.scatter(input1,output1)
ax2.scatter(input2,output2)
ax1.set_xlabel('x')
ax1.set_ylabel('sin(x)')
ax1.set_xlim([0,1.0])
ax1.grid(True)
ax2.set_xlabel('x')
ax2.set_ylabel('sin(x)')
ax2.set_xlim([0,1.0])
ax2.grid(True)
fig . show ()
Correspondence> fig.show () is unnecessary
Similar Posts:
- [Solved] UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the fi…
- Solve the problem of attributeerror: module ‘Matplotlib’ has no attribute ‘verb
- RuntimeError: Python is not installed as a framework [How to Solve]
- [Solved] Runtime Warning: Font Glyph 20108 is missing. Font.set Fu text (s,0.0,flags=flags), RuntimeWarningGlyph20108missingfromcurrentfontfontsettexts00flagsflags
- _tkinter.TclError: no display name and no $DISPLAY environment variable
- only size-1 arrays can be converted to Python scalars
- ImportError: cannot import name cbook
- [Solved] Pycharm Error: Error: failed to send plot to http://127.0.0.1:63342
- Matplotlib.pyplot Plug-in Chinses Font Error: RuntimeWarning: Glyph 26376 missing from current font
- TypeError: strptime() argument 1 must be str, not bytes