magali.plot_bounding_boxes#
- magali.plot_bounding_boxes(bounding_boxes, ax=None, edgecolor='k', linewidth=2, **kwargs)[source]#
Plot bounding boxes on a matplotlib Axes.
Used to visualize the bounding boxes of detected anomalies, such as those produced by
magali._detection.detect_anomalies.- Parameters:
- bounding_boxes
listoflistoffloat List of bounding boxes in data coordinates. Each bounding box is a list or array in the format [x_min, x_max, y_min, y_max].
- ax
matplotlib.axes.Axes,optional The matplotlib Axes on which to plot the bounding boxes. If None, uses the current Axes.
- edgecolor
strortuple, default=”k” Color of the bounding box edges.
- linewidth
float, default=2 Width of the bounding box edges.
- **kwargs
dict,optional Additional keyword arguments passed to
matplotlib.patches.Rectangle, such as linestyle or alpha.
- bounding_boxes
- Returns:
- ax
matplotlib.axes.Axes The matplotlib Axes object with the plotted bounding boxes.
- ax