with a click of the finger the x axis can be made a datetime object and will auto scale from years through months ,days ,hours, minutes ,seconds to microseconds
Code:
import csv, sys
import matplotlib.pyplot as plt
import datetime
filename = 'test0.csv'
t=[] #time
a=[] #altitude
n=0
date=datetime.datetime.now()
with open(filename, 'rb') as f:
reader = csv.reader(f)
for row in reader:
#print row
n +=1
tn=date+datetime.timedelta(seconds=n/100.0)
a.append(float(row[4]))
t.append(tn)
plt.title('Canadaroad')
plt.ylabel('Altitude Feet')
plt.gcf().autofmt_xdate(bottom=0.2, rotation=30, ha='right')
plt.plot_date(t,a,'b-',label='Altitude')
plt.legend(loc=0,numpoints=1)
plt.figure(num=1,figsize=(14,10),dpi=80)
plt.show()
#print a
i'm yet to tackle 3d objects in python but I think it should not be too difficult
Bookmarks