PlotUtils.MatrixPlot

PlotUtils.MatrixPlot#

PlotUtils.MatrixPlot.py

compute_3d_xyz(M, x=None, y=None)#
simple_plot_3d(ax, M, x=None, y=None, **kwargs)#

Plot M as a 3D surface on a provided 3D axes.

The caller is responsible for creating the figure and 3D axes:

fig, ax = plt.subplots(subplot_kw={‘projection’: ‘3d’}) simple_plot_3d(ax, M, x=q_values, y=frame_numbers)

Parameters:
  • ax (mpl_toolkits.mplot3d.Axes3D) – An existing 3D axes to plot into.

  • M (2D array-like, shape (n_x, n_y)) – The matrix to render as a surface.

  • x (array-like, optional) – Values for the first axis (rows of M). Defaults to integer indices.

  • y (array-like, optional) – Values for the second axis (columns of M). Defaults to integer indices.

  • **kwargs – Additional keyword arguments passed to ax.plot_surface(), plus: view_init (dict) — passed to ax.view_init(); colorbar (bool) — add a colorbar if True; view_arrows (bool) — overlay view-direction arrows if True.

contour_plot(ax, M, x=None, y=None, **kwargs)#