drawRects¶
- emlib.matplotting.drawRects(ax, data, facecolor=None, alpha=None, edgecolor=None, linewidth=None, profile={'alpha': 0.75, 'annotation_alpha': 0.3, 'annotation_color': (0, 0, 0), 'autoscale': True, 'background': (0, 0, 0), 'colormap': 'jet', 'edgecolor': 1, 'facecolor': 0.8, 'label_alpha': 0.75, 'label_font': 'sans-serif', 'label_size': 10, 'line_alpha': 0.8, 'line_style': 'solid', 'linewidth': 1}, autolim=True)[source]¶
Draw multiple rectangles
- Parameters:
ax (Axes) – the plot axes
data – either a 2D array of shape (num. rectangles, 4), or a list of tuples (x0, y0, x1, y1), where each row is a rectangle
facecolor (_colort) – the face color
edgecolor (_colort) – the color of the edges
alpha (float) – alpha value for the rectangle (both facecolor and edgecolor)
label – if given, a label is plotted at the center of the rectangle
profile – the profile used, or None for default
autolim – autoscale view
linewidth (float | None) – line width
- Return type:
None