Plotting Functions and Utilities

Utilities.plotting.plot_C_arrows(ax, pos, C, R=None, c_index=0, scale=1.0, **kwargs)[source]

Plot growth constants as arrows.

Parameters
  • ax (matplotlib.axes.Axes) – Axes on which the arrows will be drawn.

  • pos (torch.Tensor) – Positions of the growth constants arrows.

  • C (torch.Tensor) – Growth constants.

  • R (torch.Tensor, default=None) – Local frame of each positions. If none, will assume idendity.

  • c_index (int, default=0) – The dimension of the growth constants that will get drawn.

  • scale (float, default=1.) – Scale applied to the arrow lengths.

  • kwargs (dict) – Keyword arguments that gets passed to the underlying matplotlib plot functions.

Utilities.plotting.plot_C_ellipses(ax, pos, C, R=None, c_index=0, scale=1.0, **kwargs)[source]

Plot growth constants as ellipses.

Parameters
  • ax (matplotlib.axes.Axes) – Axes on which the ellipses will be drawn.

  • pos (torch.Tensor) – Positions of the growth constants ellipses.

  • C (torch.Tensor) – Growth constants.

  • R (torch.Tensor, default=None) – Local frame of each positions. If none, will assume idendity.

  • c_index (int, default=0) – The dimension of the growth constants that will get drawn.

  • scale (float, default=1.) – Scale applied to the ellipses.

  • kwargs (dict) – Keyword arguments that gets passed to the underlying matplotlib plot functions.

Utilities.plotting.plot_aabb(ax, aabb, **kwargs)[source]
Utilities.plotting.plot_basis3d(points, basis, length=0.1, **kwargs)[source]
Utilities.plotting.plot_closed_shape(shape, **kwargs)[source]
Utilities.plotting.plot_grid(ax, gridx, gridy, **kwargs)[source]

Plot grid.

Parameters
  • ax (matplotlib.axes.Axes) – Axes on which the grid will be drawn.

  • gridx – Abscisse component of the grid that will be drawn.

  • gridy – Ordinate component of the grid that will be drawn.

  • kwargs (dict) – Keyword arguments that gets passed to the plot() functions.

Utilities.plotting.plot_polyline(ax, polyline, close=False, **kwargs)[source]
Utilities.plotting.set_aspect_equal_3d(ax)[source]

Fix equal aspect bug for 3D plots. Equivalent to plt.axis(‘equal’) in 3D.