
I managed to create this graph using matplotlib. I would like to remove 0.2, 0.4, 0.6 .. from an axis named B and change the spacing of the axes from 200 to 100 in an axis named A. I tried to do this for quite some time ... Any suggestions?
here is the code i wrote.
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()
Please ignore irrelevant details.
source share