Skip to main content

plots.plot_probe_rect

plots.plot_probe_rect(xy, color, ax, width=16, height=40)

Plot probe channels as rectangles with specified colors.

This function uses matplotlib rectangles to visualize probe channels at their spatial coordinates with specified colors and dimensions.

Args: xy (np.ndarray): Array of shape (n_channels, 2) containing x,y coordinates for each channel in micrometers. color (np.ndarray): Array of shape (n_channels, 3) or (n_channels, 4) containing RGB or RGBA colors for each channel. ax (matplotlib.axes.Axes): Axes on which to plot the rectangles. width (float, optional): Width of each rectangle in micrometers. Defaults to 16. height (float, optional): Height of each rectangle in micrometers. Defaults to 40.

Returns: None: The function modifies the provided axes.

Note: The function automatically adjusts the plot limits to accommodate all rectangles. Each channel is represented by a filled rectangle centered at its spatial coordinates.