-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrapper.py
More file actions
63 lines (49 loc) · 1.67 KB
/
wrapper.py
File metadata and controls
63 lines (49 loc) · 1.67 KB
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
56
57
58
59
60
61
62
import matplotlib.pyplot as plt
import iplot
var = [None]
def register(s):
var[0] = s
def s():
return var[0]
def plot(f, **kwargs):
fig, (ax1) = plt.subplots(1)
p1 = iplot.plot(ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def complex_plot(f, **kwargs):
fig, (ax1) = plt.subplots(1)
p1 = iplot.complex_plot(ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def ortskurve(f, **kwargs):
fig, (ax1) = plt.subplots(1)
p1 = iplot.ortskurve(ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def bode(f, **kwargs):
fig, (ax1, ax2) = plt.subplots(2)
p1 = iplot.bode(ax1, ax2, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def wok(f, **kwargs):
fig, (ax1) = plt.subplots(1)
axslider = plt.axes([0.1, 0.01, 0.8, 0.02])
p1 = iplot.wok(axslider, ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def impuls(f, **kwargs):
fig, (ax1) = plt.subplots(1)
p1 = iplot.impuls(ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def sprung(f, **kwargs):
fig, (ax1) = plt.subplots(1)
p1 = iplot.sprung(ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def harmonisch(f, **kwargs):
fig, (ax1) = plt.subplots(1)
axslider2 = plt.axes([0.1, 0.01, 0.8, 0.02])
axslider1 = plt.axes([0.1, 0.04, 0.8, 0.02])
p1 = iplot.harmonisch(axslider1, axslider2, ax1, f, s(), **kwargs)
return iplot.show(fig, (p1, ))
def response(system, **kwargs):
fig, (ax1) = plt.subplots(1)
sliders = []
for i in range(system.ui_number()):
sliders.append(plt.axes([0.90 + .03 * i, 0.1, 0.02, 0.8]))
p1 = iplot.response(sliders, ax1, system, **kwargs)
return iplot.show(fig, (p1, ))