From 28a38dcf869173bf9ac1183d20c55d68518654dc Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Mon, 27 Aug 2018 16:23:56 -0400 Subject: [PATCH] Made so that initially no graph is shown --- Demo_Matplotlib_Multiple.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Demo_Matplotlib_Multiple.py b/Demo_Matplotlib_Multiple.py index d56d46d9..a3d933f5 100644 --- a/Demo_Matplotlib_Multiple.py +++ b/Demo_Matplotlib_Multiple.py @@ -247,20 +247,15 @@ form.Show(non_blocking=True) form.NonBlocking = False # add the plot to the window -func = fig_dict['Pyplot Simple'] while True: - fig = func() - fig_photo = draw_figure(canvas_elem.TKCanvas, fig) - - # show it all again and get buttons button, values = form.Read() + # show it all again and get buttons if button is None or button is 'Exit': break - choice = values['func'][0] - try: func = fig_dict[choice] except: func = fig_dict['Pyplot Simple'] - + fig = func() + fig_photo = draw_figure(canvas_elem.TKCanvas, fig)