Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/path/to/python
- # numerical data
- # python GraphicalPart.py ../S001R03_data.txt_motor.txt_0.0_T0.txt
- import sys
- import matplotlib.pyplot as plt
- import sys
- def startDivide(fileName):
- inputFile = open(fileName)
- outputFile = open(fileName + "_out.txt", "w")
- #a = []
- for line in inputFile.readlines():
- data = line.split(" ")
- outputFile.write("%s" % (data[1]))
- plt.plot(a)
- plt.show()
- inputFile.close()
- outputFile.close()
- def main():
- if len(sys.argv) != 2:
- print "Not enough arguments. *_data.txt file only!"
- else:
- startDivide(sys.argv[1])
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment