【发布时间】:2021-07-22 11:29:24
【问题描述】:
我正在尝试更改条形图的大小,但遇到了一些困难。这些条从我的数据中正确绘制,但是当我调整 size 参数时画布的大小没有增加。我没有收到任何错误,所以我不确定我错过了什么。
# define the window layout
layoutMain = [[sg.Text('Member Access')],
[sg.Menu(mainmenu_def, pad=(0,0))],
[sg.Button('Store To Inventory', size = (17,1)), sg.Button('Retrieve From Inventory', size = (17,1)), sg.Button('Inventory Details', size = (17,1)), sg.Button('Exit to Home', button_color = '#36454f', size = (17,1))],
[sg.Text('E-Stock', font='Any 18')],
[sg.Canvas(size=(100, 100), key='-CANVAS-')]]
windowMain = sg.Window('E-Stock', layoutMain, no_titlebar=False, size=(1000,600), finalize=True, resizable=True)
windowMain.maximize()
# add the plot to the window
fig_photo = draw_figure(windowMain['-CANVAS-'].TKCanvas, fig)
【问题讨论】:
标签: python matplotlib pysimplegui