Plotters

This source file is intended to be a home for plotting-related utility functions, but there’s not much here yet!

kszx.plot.real_space_plotter(arr, filename=None, axis=None, vmax=None, title=None)

General purpose function for plotting a real-space field by averaging over specified axes.

Function args:
  • arr (array-like): the real-space field to plot

  • filename (str, optional): filename for saving the plot as a PDF

  • axis (list of ints, optional): the axes to average over for each plot

  • vmax (float, optional): maximum color scale value; if None, determined automatically

  • title: (str, optional): title for the plot

This function displays and optionally saves the plot with symmetric color scaling around zero (from -vmax to vmax).

(Source: Selim’s helperfunctions.py, Nov 2024.)