From 2384a4e12cb029cbd6c8595fa9f3c5a666a391da Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 2 Aug 2017 22:28:17 +0200 Subject: o Importing formatting tools. --- ee/tools/read_ltspice_raw.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 ee/tools/read_ltspice_raw.py (limited to 'ee/tools/read_ltspice_raw.py') diff --git a/ee/tools/read_ltspice_raw.py b/ee/tools/read_ltspice_raw.py deleted file mode 100644 index 279fe73..0000000 --- a/ee/tools/read_ltspice_raw.py +++ /dev/null @@ -1,31 +0,0 @@ -import ee -import sys - -raw = ee.read_ltspice_raw(sys.argv[1]) - -#print("Variables:") -#for i, v in enumerate(raw.variables): -# print("{:2}: kind: {:20} expression: {}".format(i, v.kind, v.expression)) - -#for i, v in enumerate(raw.variables): -# print("{:2}: kind: {:20} expression: {}".format(i, v.kind, v.expression)) -# for p in raw.values[i]: -# print(" {}".format(p)) - -x = raw.get_variable(idx = 0) -y = raw.get_variable(expression = 'V(load)') -xs = raw.get_values(y) - -import matplotlib -matplotlib.use('Agg') - -import matplotlib.pyplot as plt -from matplotlib.ticker import FuncFormatter, MaxNLocator -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(xs) -ax.set_xlabel(x.expression) -ax.set_ylabel(y.expression) - -with open("ltspice.png", "wb") as f: - plt.savefig(f, format="png") -- cgit v1.2.3