7 if __name__ == "__main__":
9 f = open(sys.argv[1], "r")
10 s = f.readline().strip("#\r\n \t").split(" ")
11 while (len(s) < 6 or s[1] != "Scale"):
12 s = f.readline().strip("#\r\n \t").split(" ")
14 s = float(s[3]) * float(s[5])
18 plotfile = open(".plot.py.tmp", "w")
20 plotfile.write("set title \"" + str(sys.argv[1]) + "\"\n")
21 plotfile.write("set xlabel \"U (Volts)\"\n")
22 plotfile.write("set ylabel \"I (uA)\"\n")
23 plotfile.write("plot \""+str(sys.argv[1])+"\" u ($2 * 16.8 / 4000):(($3 / 0.170) * 268 * 1e6 * "+str(s)+") w lp t \""+str(sys.argv[1])+"\"\n")
27 result = os.system("gnuplot --persist .plot.py.tmp")
29 os.remove(".plot.py.tmp")