From 6cfce5ee484a523f0b4c47ccbe55fdb29071a16f Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Fri, 21 Sep 2018 01:09:48 -0400 Subject: [PATCH] Draw Axis --- Demo_Graph_Element_Sine_Wave.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Demo_Graph_Element_Sine_Wave.py b/Demo_Graph_Element_Sine_Wave.py index 112ee6a2..0d451067 100644 --- a/Demo_Graph_Element_Sine_Wave.py +++ b/Demo_Graph_Element_Sine_Wave.py @@ -7,8 +7,11 @@ form = sg.FlexForm('Graph of Sine Function').Layout(layout) form.Finalize() graph = form.FindElement('graph') +graph.DrawLine((-100,0), (100,0)) +graph.DrawLine((0,-100), (0,100)) + for x in range(-100,100): y = math.sin(x/20)*50 - graph.DrawPoint((x,y)) + graph.DrawPoint((x,y), color='red') button, values = form.Read()