matplotlib を使用してこのグラフを作成することができました。B という名前の軸から 0.2、0.4、0.6.. を削除し、A という名前の軸で軸間隔を 200 から 100 に変更したいと思います。 ?
ここに私が書いたコードがあります。
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
f_attributes=open("continuous.data","r")
x=[]
y=[]
spam=[]
count=1
skew=[]
fig = plt.figure()
ax = Axes3D(fig)
total=[]
while count<=1024:
attributes=f_attributes.readline()
attributes=attributes.replace(".\n","")
attributes=attributes.split(',')
classification=int(attributes[10].replace(".\n",""))
if float(attributes[8]) >=0:
skew.append(float(attributes[8]))
x.append(count)
y.append(classification)
if classification == 0:
ax.scatter(x, y, skew, c='g', marker='o')
else:
ax.scatter(x, y, skew, c='r', marker='o')
x=[]
y=[]
skew=[]
count+=1
ax.set_xlabel('A')
ax.set_ylabel('B')
ax.set_zlabel('C')
plt.show()
関係のない詳細は無視してください..