# -*- coding: utf-8 -*-
"""
Created on Sat Jun 11 10:06:55 2011
@author: -
"""
import matplotlib as mpl
## loading both pylab and mpl.pyplot is a little redundant
#import matplotlib.pyplot as plt
import pylab
import scipy
## don't need numpy when you have scipy already :)
#import numpy
data = pylab.rand(98760,6)
'''
pylab offers many functions from scipy in order to simplify daily tasks.
however, when doing more complex stuff where scipy/numpy is required,
it's probably better to use it consistently.
'''
data = scipy.rand(98760,6)
data = scipy.rand(5,4)
print data ## looks totally OK to me
data = scipy.loadtxt('karthikIN.csv', delimiter=';')
print data ## also OK
datafile1 = 'vet1.csv'
pylab.savetxt(datafile1, data, delimiter=';')
print 'loading', datafile1
## don't transpose here in order to compare with infile:
a1 = pylab.loadtxt(datafile1, comments='#', delimiter=';')#.T
print a1 ## again, this is totally OK and as expected
print a1 == data
pylab.close('all')
v1 = [0,1]
v2 = [-2,2]
pylab.figure()
pylab.ylim(v2)
for i in range(2):
pylab.plot(a1[i])
pylab.show()