If I create a figure object with matplotlib.pyplot while using PySimpleGUI, the window size of the application created with PySimpleGUI will be fixedly reduced. Is there any way to avoid this?
Run Environment
Python 3.10.2
matplotlib 3.5.1
PySimpleGUI 4.57.0
Windows 11 Home(21H2)
Intel® Core™ i5-1035G4 [email protected] 1.50GHz
source code
import PySimpleGUI aspg
import matplotlib.pyplot asplt
layout = [
[pg.Button(key='-button-', button_text='')]
]
window=pg.Window('demo', layout, size=(800,600))
while True:
event,_=window.read()
if event==None:
break
if event=='-button-':
plt.figure()
I have a similar question on another site, so I will share it here.
https://github.com/PySimpleGUI/PySimpleGUI/issues/4561
© 2024 OneMinuteCode. All rights reserved.