BioSANS2020.gui_functs.draw_figure
¶
This is the draw_figure module
This module controls how plots are drawn inside BioSANS canvas
The following is the list of function for this module:
canvas_update_widgets
delete_this
draw_figure
Module Contents¶
Functions¶
|
This function update the canvas upon adding new objects by moving |
|
This function removes objects from the canvas and reorder objects |
|
This function draws figure to the canvas by first adding a canvas |
- BioSANS2020.gui_functs.draw_figure.canvas_update_widgets(_, canvas)¶
This function update the canvas upon adding new objects by moving objects to ensure they fit nicely. The arrangement is that the last object added appear first (latest goes on top). Args:
canvas : the canvas object
- BioSANS2020.gui_functs.draw_figure.delete_this(frame, canvas)¶
This function removes objects from the canvas and reorder objects
- BioSANS2020.gui_functs.draw_figure.draw_figure(items, figure, loc=(0, 0))¶
This function draws figure to the canvas by first adding a canvas object to the canvas, adding a frame to the newly created canvas and putting the figure to FigureCanvasTkAgg with frame as the parent. Args:
items : 3 item list of [canvas, scroll_x, scroll_y] figure: the figure to be drawn in canvas i.e. plt.gcf() figure