我试图在齐柏林飞艇中绘制一个散射矩阵,到目前为止还没有运气。 其他图形类型效果很好。
%pyspark
import numpy as np
import pandas as pd
from pandas.plotting import scatter_matrix
import matplotlib.pyplot as plt
df = pd.DataFrame(np.random.randn(1000, 4), columns=['a', 'b', 'c', 'd'])
scatter_matrix(df, alpha=0.2, figsize=(6, 6), diagonal='kde')
#plt.show()
我只得到以下输出,但不显示任何内容
array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e4c6110>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e459050>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f5535b2ee10>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e315090>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e459690>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f5541ef4f10>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f5541e87490>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e27ae10>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e36f7d0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e36f890>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e40b850>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e3e07d0>],
[<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e46fb10>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553e40b7d0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553538b5d0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f553565ab10>]],
dtype=object)
编辑
当我取消注释plt.show
时,什么也没有发生,并且该段落一直持续运行。
当我查看日志时,看到:
INFO [2019-02-17 19:41:40,633] ({qtp684874119-552} NotebookServer.java[onClose]:371) - Closed connection to 10.0.0.218 : 36852. (1006) EOF: Broken pipe
ERROR [2019-02-17 19:41:40,633] ({qtp684874119-552} NotebookServer.java[onMessage]:365) -
Can't handle message: {"op":"GET_NOTE","data":{"id":"2DUARG7GZ"},"principal":"admin","ticket":"60cdc7e2-70f8-48d3-9f7d-8c98f7040955","roles":"[]"}
org.eclipse.jetty.io.EofException
Caused by: java.io.IOException: Broken pipe
Caused by: java.lang.NullPointerException: Inflater has been closed