Exemple #1
0
def visualize(ac1, ac2, ac3):
    print(ac1)
    print(ac2)
    print(ac3)

    nac1 = np.asarray(ac1)
    nac2 = np.asarray(ac2)
    nac3 = np.asarray(ac3)

    together = np.concatenate((nac1, nac2, nac3), axis=0)

    df.append(
        pd.DataFrame({
            'Class1':
            nac1,
            'Class2':
            nac2,
            'combined':
            nac3,
            'percent':
            pd.Categorical(['25' for i in range(0, len(nac1))]),
        }))

    print(df)

    x = np.arange(3)
    ax = plt.subplot(111)
    ax.bar(x - 0.2, ac1, width=0.2, color='b', align='center')
    ax.bar(x, ac2, width=0.2, color='g', align='center')
    ax.bar(x + 0.2, ac3, width=0.2, color='r', align='center')

    plt.savegif('baractive.png')
def visualize(ac1,ac2,ac3):
	print(ac1)
	print(ac2)
	print(ac3)

	nac1 = np.asarray(ac1)
	nac2 = np.asarray(ac2)
	nac3 = np.asarray(ac3)

	together = np.concatenate((nac1,nac2,nac3),axis=0)

	df.append(pd.DataFrame({
		'Class1': nac1,
		'Class2': nac2,
		'combined': nac3,
		'percent' : pd.Categorical(['25' for i in range(0,len(nac1))]),
		}))

	print(df)


	x=np.arange(3)
	ax = plt.subplot(111)
	ax.bar(x-0.2,ac1,width=0.2,color='b',align='center')
	ax.bar(x,ac2,width=0.2,color='g',align='center')
	ax.bar(x+0.2,ac3,width=0.2,color='r',align='center')


	plt.savegif('baractive.png')
Exemple #3
0
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

file = "trayectoria_E_alpha.dat"

puntos=100
data = np.loadtxt(file)
x=data[:,0]
y=data[:,1]
z=data[:,2]
fig = plt.figure() 
ax = fig.add_subplot(111, projection='3d') 
o=fig.gca(projection='3d') 
o.plot(x,y,z)
plt.savegif("Grafica.pdf",format="pdf")