snapatac2.pl.render_plot#

snapatac2.pl.render_plot(fig, width=600, height=400, interactive=True, show=True, out_file=None, scale=None)[source]#

Render a plotly figure.

Note that this function is not intended to be called directly. Instead, it is called by other plotting functions in this package.

Parameters:
  • fig (plotly.graph_objects.Figure) – The plotly figure to render.

  • width (int) – The width of the plot.

  • height (int) – The height of the plot.

  • interactive (bool) – Whether to make interactive plot.

  • show (bool) – Show the figure.

  • out_file (str | None) – Path of the output file for saving the output image, end with ‘.svg’ or ‘.pdf’ or ‘.png’ or ‘.html’.

  • scale (float | None) – Scale factor for the image. Only used when out_file is not None. Use scale > 1 to increase resolution and scale < 1 to decrease.

Returns:

If show=False and out_file=None, an plotly.graph_objects.Figure will be returned, which can then be further customized using the plotly API.

Return type:

‘plotly.graph_objects.Figure’ | None