ptvis.utils.add_annotations

ptvis.utils.add_annotations(fig, annotations, row=None, col=None)[source]

Add multiple annotations fast.

Parameters:
  • fig (plotly.graph_objects.Figure) – Figure object to which shapes are added.

  • annotations (iterable of plotly.graph_objects.layout.Annotation) – Annotation objects to be added.

  • row (int, optional) – Row where annotations are added.

  • col (int, optional) – Column where annotations are added.

Returns:

plotly.graph_objects.Figure – Same figure object as the fig argument.