artlib.common.visualization

Collection of visualization utilities.

Functions

plot_gaussian_contours_fading(ax, mean, std_dev, color)

Plot concentric ellipses to represent the contours of a 2D Gaussian distribution

plot_gaussian_contours_covariance(ax, mean, ...[, ...])

Plot concentric ellipses to represent the contours of a 2D Gaussian distribution

plot_weight_matrix_as_ellipse(ax, s, W, mean, color[, ...])

Plot the transformation of a unit circle by the weight matrix W as an ellipse.

Module Contents

artlib.common.visualization.plot_gaussian_contours_fading(ax: matplotlib.axes.Axes, mean: numpy.ndarray, std_dev: numpy.ndarray, color: numpy.ndarray, max_std: int = 2, sigma_steps: float = 0.25, linewidth: int = 1)

Plot concentric ellipses to represent the contours of a 2D Gaussian distribution with fading colors.

Parameters:
  • ax (matplotlib.axes.Axes) – Matplotlib axis object to plot the ellipses.

  • mean (np.ndarray) – A numpy array representing the mean (μ) of the distribution.

  • std_dev (np.ndarray) – A numpy array representing the standard deviation (σ) of the distribution.

  • color (np.ndarray) – A 4D numpy array including RGB and alpha channels to specify the color and initial opacity.

  • max_std (int, optional) – Maximum number of standard deviations to draw contours to, by default 2.

  • sigma_steps (float, optional) – Step size in standard deviations for each contour, by default 0.25.

  • linewidth (int, optional) – Width of the boundary line, by default 1.

artlib.common.visualization.plot_gaussian_contours_covariance(ax: matplotlib.axes.Axes, mean: numpy.ndarray, covariance: numpy.ndarray, color: numpy.ndarray, max_std: int = 2, sigma_steps: float = 0.25, linewidth: int = 1)

Plot concentric ellipses to represent the contours of a 2D Gaussian distribution with fading colors. Accepts a covariance matrix to properly represent the distribution’s orientation and shape.

Parameters:
  • ax (matplotlib.axes.Axes) – Matplotlib axis object to plot the ellipses.

  • mean (np.ndarray) – A numpy array representing the mean (μ) of the distribution.

  • covariance (np.ndarray) – A 2x2 numpy array representing the covariance matrix of the distribution.

  • color (np.ndarray) – A 4D numpy array including RGB and alpha channels to specify the color and initial opacity.

  • max_std (int, optional) – Maximum number of standard deviations to draw contours to, by default 2.

  • sigma_steps (float, optional) – Step size in standard deviations for each contour, by default 0.25.

  • linewidth (int, optional) – Width of the boundary line, by default 1.

artlib.common.visualization.plot_weight_matrix_as_ellipse(ax: matplotlib.axes.Axes, s: float, W: numpy.ndarray, mean: numpy.ndarray, color: numpy.ndarray, linewidth: int = 1)

Plot the transformation of a unit circle by the weight matrix W as an ellipse.

Parameters:
  • ax (matplotlib.axes.Axes) – Matplotlib axis object to plot the ellipse.

  • s (float) – Scalar to scale the weight matrix W.

  • W (np.ndarray) – 2x2 weight matrix.

  • mean (np.ndarray) – The center point (x, y) of the ellipse.

  • color (np.ndarray) – Color of the ellipse.

  • linewidth (int, optional) – Width of the boundary line, by default 1.