ott.problems.linear.potentials.DualPotentials.plot_potential

ott.problems.linear.potentials.DualPotentials.plot_potential#

DualPotentials.plot_potential(forward=True, quantile=0.05, kantorovich=True, ax=None, x_bounds=(-6, 6), y_bounds=(-6, 6), num_grid=50, contourf_kwargs=None)[source]#

Plot the potential.

Parameters:
  • forward (bool) – use the forward map from the potentials if True, otherwise use the inverse map

  • quantile (float) – quantile to filter the potentials with

  • kantorovich (bool) – whether to plot the Kantorovich potential

  • ax (Optional[Axes]) – axis to add the plot to

  • x_bounds (Tuple[float, float]) – x-axis bounds of the plot \((x_{\text{min}}, x_{\text{max}})\)

  • y_bounds (Tuple[float, float]) – y-axis bounds of the plot \((y_{\text{min}}, y_{\text{max}})\)

  • num_grid (int) – number of points to discretize the domain into a grid along each dimension

  • contourf_kwargs (Optional[Dict[str, Any]]) – additional kwargs passed into contourf()

Return type:

Tuple[Figure, Axes]

Returns:

Figure and axes.