MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / draw_figure

Function draw_figure

DemoPrograms/Demo_Matplotlib_Browser.py:830–839  ·  view source on GitHub ↗
(canvas, figure)

Source from the content-addressed store, hash-verified

828
829# The magic function that makes it possible.... glues together tkinter and pyplot using Canvas Widget
830def draw_figure(canvas, figure):
831 if not hasattr(draw_figure, 'canvas_packed'):
832 draw_figure.canvas_packed = {}
833 figure_canvas_agg = FigureCanvasTkAgg(figure, canvas)
834 figure_canvas_agg.draw()
835 widget = figure_canvas_agg.get_tk_widget()
836 if widget not in draw_figure.canvas_packed:
837 draw_figure.canvas_packed[widget] = figure
838 widget.pack(side='top', fill='both', expand=1)
839 return figure_canvas_agg
840
841
842def delete_figure_agg(figure_agg):

Callers 1

Calls 1

drawMethod · 0.45

Tested by

no test coverage detected