grapa.plot.plot_graph.plot_graph
- grapa.plot.plot_graph.plot_graph(graph: Graph, filesave: str = '', img_format: str = '', figsize=(0, 0), if_save=True, if_export=True, fig_ax: Tuple[Figure, Axes | None] | None = None, if_subplot=False, figure_factory: MplFigureFactory | None = None)
Plot the content of the object.
- Parameters:
graph – a Graph object
filesave – (optional) filename for the saved graph
img_format – by default image will be .png. Possible format are the ones accepted by matplotlib Figure.savefig
figsize – default figure size is a class consant
if_save – if True, save the plot as an image.
if_export – if True, create a human- and machine-readable .txt file containing all information of the graph
fig_ax – [fig, ax]. Useful when wish to embedd graph in a GUI.
if_subplot – False, unless fig to be drawn in a subplot. Not handled by the GUI, but might be useful in scripts. Prevents deletion of existing axes.
figure_factory – By default, creates pyplot figures. May inject e.g. MplFigureFactory(use_pyplot=False)