我正在寻找一种为熊猫设置标题的方法scatter matrix:
from pandas.tools.plotting import scatter_matrix
scatter_matrix(data, alpha=0.5,diagonal='kde')
Run Code Online (Sandbox Code Playgroud)
我试过plt.title('scatter-matrix')但它创造了一个新的数字.
任何帮助表示赞赏.
我是3D绘图的新手。我只想从5个点中构建一个金字塔并切入一个平面。我的问题是我不知道该如何填补问题。
points = np.array([[-1, -1, -1],
[1, -1, -1 ],
[1, 1, -1],
[-1, 1, -1],
[0, 0 , 1]])
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
r = [-1,1]
X, Y = np.meshgrid(r, r)
ax.plot_surface(X,Y,-1, alpha=0.5)
ax.plot_surface(X,Y,0.5, alpha=0.5, facecolors='r')
ax.scatter3D(points[:, 0], points[:, 1], points[:, 2])
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
plt.show()
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏。