From 7e972b52779dd57acc9ac4796d06c728a05a77b0 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Wed, 18 Sep 2019 20:15:45 -0400 Subject: [PATCH] cleanup to more recent constructs --- DemoPrograms/Demo_Matplotlib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DemoPrograms/Demo_Matplotlib.py b/DemoPrograms/Demo_Matplotlib.py index b464d34c..73363a98 100644 --- a/DemoPrograms/Demo_Matplotlib.py +++ b/DemoPrograms/Demo_Matplotlib.py @@ -93,9 +93,9 @@ layout = [[sg.Text('Plot test', font='Any 18')], [sg.OK(pad=((figure_w / 2, 0), 3), size=(4, 2))]] # create the form and show it without the plot -window = sg.Window('Demo Application - Embedding Matplotlib In PySimpleGUI', force_toplevel=True).Layout(layout).Finalize() +window = sg.Window('Demo Application - Embedding Matplotlib In PySimpleGUI', layout, force_toplevel=True, finalize=True) # add the plot to the window -fig_photo = draw_figure(window.FindElement('canvas').TKCanvas, fig) +fig_photo = draw_figure(window['canvas'].TKCanvas, fig) -event, values = window.Read() +event, values = window.read()