about summary refs log tree commit diff
path: root/src/python/draw
diff options
context:
space:
mode:
authorhanemile <emile.hansmaennel@gmail.com>2018-03-19 20:47:13 +0100
committerhanemile <emile.hansmaennel@gmail.com>2018-03-19 20:47:13 +0100
commitd0f19b8bc7ab11449cea028106504cacecd94f66 (patch)
tree8ce0c9298694554a46545731c949fb18332669cb /src/python/draw
parent996e5529f566d7c64763c47348fc68fae51ef6a4 (diff)
cleaned up
Diffstat (limited to 'src/python/draw')
-rw-r--r--src/python/draw/draw.py20
-rwxr-xr-xsrc/python/draw/plot_lookuptable.py21
2 files changed, 41 insertions, 0 deletions
diff --git a/src/python/draw/draw.py b/src/python/draw/draw.py
new file mode 100644
index 0000000..e672a76
--- /dev/null
+++ b/src/python/draw/draw.py
@@ -0,0 +1,20 @@
+import matplotlib.pyplot as plt
+
+listx = []
+listy = []
+
+with open("testFile.csv") as f:
+    data = f.readlines()
+
+    print(data[1:1000])
+
+    for i in range(0, 1000):
+        listx.append(data[i].split(", ")[0])
+
+
+
+# for value in listx:
+#     print(value, end="\n")
+
+plt.plot(listx)
+plt.show()
diff --git a/src/python/draw/plot_lookuptable.py b/src/python/draw/plot_lookuptable.py
new file mode 100755
index 0000000..9d5c6f2
--- /dev/null
+++ b/src/python/draw/plot_lookuptable.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import matplotlib.pyplot as plt
+
+lookup_arr_a = []
+lookup_arr_b = []
+
+path = "data/2e7.csv"
+
+print("opening data...")
+
+with open(path) as data:
+    print("opened " + path)
+
+    lookup = data.readlines()
+    for i in range(0, len(lookup)):
+        lookup_arr_a.append(lookup[i].split(", ")[0])
+        lookup_arr_b.append(lookup[i].split(", ")[1])
+
+plt.plot(lookup_arr_a, lookup_arr_b)
+plt.show()