Argument order change

This commit is contained in:
PySimpleGUI 2020-07-07 14:41:30 -04:00
parent 97061b3614
commit af6b1d36c3
1 changed files with 3 additions and 3 deletions

View File

@ -15,12 +15,12 @@ def create_figure():
return fig return fig
def draw_figure(fig, element): def draw_figure(element, fig):
""" """
Draws the previously created "figure" in the supplied Image Element Draws the previously created "figure" in the supplied Image Element
:param fig: a Matplotlib figure
:param element: an Image Element :param element: an Image Element
:param fig: a Matplotlib figure
:return: The figure canvas :return: The figure canvas
""" """
@ -50,7 +50,7 @@ def main():
if event == 'Exit' or event == sg.WIN_CLOSED: if event == 'Exit' or event == sg.WIN_CLOSED:
break break
if event == 'Draw': if event == 'Draw':
draw_figure(create_figure(), window['-IMAGE-']) draw_figure(window['-IMAGE-'], create_figure())
window.close() window.close()