summaryrefslogtreecommitdiff
path: root/python-graphics/plotter.py
diff options
context:
space:
mode:
Diffstat (limited to 'python-graphics/plotter.py')
-rw-r--r--python-graphics/plotter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python-graphics/plotter.py b/python-graphics/plotter.py
index 6ab8275..32d96b2 100644
--- a/python-graphics/plotter.py
+++ b/python-graphics/plotter.py
@@ -17,6 +17,12 @@ def plot_preset(data):
y = a * x**2 + b * x + c
elif data["type"] == "line":
y = a * x + b
+ elif data["type"] == "sin":
+ c = data["c"]
+ y = a * np.sin(b * x + c)
+ elif data["type"] == "cos":
+ c = data["c"]
+ y = a * np.cos(b * x + c)
# setting the axes at the centre
fig = plt.figure()