Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib as mpl
- from mpl_toolkits.mplot3d import Axes3D
- import numpy as np
- import matplotlib.pyplot as plt
- mpl.rcParams['legend.fontsize'] = 10
- FILE_NAME = 'posiรงรฃo-w1.txt'
- f = open(FILE_NAME, 'r')
- x = []
- y = []
- z = []
- for line in f.readlines():
- coordenadas = line.split('\t')
- x.append(float(coordenadas[0]))
- y.append(float(coordenadas[1]))
- z.append(float(coordenadas[2]))
- fig = plt.figure()
- ax = fig.gca(projection='3d')
- ax.plot(x, y, z, label='trajetoria')
- ax.set(xlabel='x', ylabel='y', zlabel='z')
- ax.legend()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement