warp.autograd.jacobian_plot#

warp.autograd.jacobian_plot(
jacobians,
kernel,
inputs=None,
show_plot=True,
show_colorbar=True,
scale_colors_per_submatrix=False,
title=None,
colormap='coolwarm',
log_scale=False,
)[source]#

Visualizes the Jacobians computed by jacobian() or jacobian_fd() in a combined image plot. Requires the matplotlib package to be installed.

Parameters:
  • jacobians (dict[tuple[int, int], array]) – A dictionary of Jacobians, where the keys are tuples of input and output indices, and the values are the Jacobian matrices.

  • kernel (FunctionMetadata | Kernel) – The Warp kernel function, decorated with the @wp.kernel decorator, or a FunctionMetadata instance with the kernel/function attributes.

  • inputs (Sequence | None) – List of input variables.

  • show_plot (bool) – If True, displays the plot via plt.show().

  • show_colorbar (bool) – If True, displays a colorbar next to the plot (or a colorbar next to every submatrix if ).

  • scale_colors_per_submatrix (bool) – If True, considers the minimum and maximum of each Jacobian submatrix separately for color scaling. Otherwise, uses the global minimum and maximum of all Jacobians.

  • title (str | None) – The title of the plot (optional).

  • colormap (str) – The colormap to use for the plot.

  • log_scale (bool) – If True, uses a logarithmic scale for the matrix values shown in the image plot.

Returns:

The created Matplotlib figure.