mechanochat.plotting.plot_grid_signal_tensor#
- mechanochat.plotting.plot_grid_signal_tensor(Xgrid, Vegrid, scale=150, pivot='tail', headwidth=3, headlength=3.5, headaxislength=3, width=0.004, color='k', linestyle='-', scale_units='width', th: float = 0., ax=None)[source]#
Draw the grid-level signal orientation tensors from tl.signal_tensor.
Each grid cell gets four arrows, the two eigenvectors in both directions, so the glyph is a cross whose arms are as long as the corresponding eigenvalue: an elongated cross means the communication of that grid cell is aligned along one axis, a symmetric one means it is isotropic.
- Parameters:
Xgrid (
ndarray) – (n_grid, 2) grid positionsVegrid (
ndarray) – (n_grid, 2, 2) eigenvectors scaled by their eigenvalues, from tl.signal_tensorscale (
float, default150) – Quiver scale; larger values give shorter armspivot (
str, default'tail') – Quiver pivotheadwidth (
float) – Arrow head geometryheadlength (
float) – Arrow head geometryheadaxislength (
float) – Arrow head geometrywidth (
float, default0.004) – Arrow shaft widthcolor (
color, default'k') – Arrow colorlinestyle (
str, default'-') – Arrow line stylescale_units (
str, default'width') – Quiver scale unitsth (
float, default0.) – Grid cells whose tensor norm is below this threshold are skippedax (
Axes, optional) – Target matplotlib axes object. Creates new figure if None
- Returns:
ax (
Axes)