Update of ALL Matplotlib demos so they run on 3.1. Brought up to date too.

This commit is contained in:
PySimpleGUI 2019-09-19 13:32:25 -04:00
parent 6f02fb4a54
commit 3b24d8921e
5 changed files with 102 additions and 148 deletions

View file

@ -84,7 +84,7 @@ def draw_figure(canvas, figure, loc=(0, 0)):
figure_canvas_agg = FigureCanvasTkAgg(figure, canvas)
figure_canvas_agg.draw()
figure_canvas_agg.get_tk_widget().pack(side='top', fill='both', expand=1)
return figure_canvas_agg
#------------------------------- Beginning of GUI CODE -------------------------------
# define the window layout
@ -96,6 +96,6 @@ layout = [[sg.Text('Plot test', font='Any 18')],
window = sg.Window('Demo Application - Embedding Matplotlib In PySimpleGUI', layout, finalize=True)
# add the plot to the window
fig_photo = draw_figure(window['canvas'].TKCanvas, fig)
fig_canvas_agg = draw_figure(window['canvas'].TKCanvas, fig)
event, values = window.read()