-
Notifications
You must be signed in to change notification settings - Fork 0
/
hack_plot.py
55 lines (44 loc) · 984 Bytes
/
hack_plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-
"""
Created on Thu May 21 14:37:50 2015
@author: jblackma
"""
import sys, os
""", xlrd <-- what is this xlrd??
"""
from os import listdir
from os.path import isfile, join
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.lines as mlines
import numpy as np
"""unused import csv
import pickle
import itertools
import math
"""
plt.close("all")
current = []
voltage = []
soc = []
f = open('../../log/smplLogs/cITech3Ah.txt','r')
for line in f:
if line[0] != '#':
current.append(line.split()[13])
voltage.append(line.split()[12])
soc.append(line.split()[1])
###print(current)
voltage.pop(0) ## remove the heading "vBt"
current.pop(0) ## remove the heading "iBt"
soc.pop(0)
###print(voltage)
plt.figure(1)
plt.plot(voltage)
plt.title("voltage")
plt.figure(2)
plt.plot(current)
plt.title("current")
plt.figure(3)
plt.plot(soc)
plt.title("SoC")
plt.show()