Heat map

MatPlotLib supports various color schemes for plotting color-coded pixel values in 2d, see the MatPlotLib color schemes tutorial.

It is generally recommended to use one of the five “perceptually uniform sequential” color schemes: MatPlotLib perceptually uniform sequential color schemes

When plotting through ba_plot, the color scheme is determined in this order:

  • from the optional plotargs arguments if there is one with keyword cmap, like cmap='jet';
  • otherwise from the environment variable CMAP, if defined;
  • otherwise from the hard-coded default “inferno”.

Note that the variable image.cmap from matplotlib.pyplot.rcParams is ignored. This is a concious choice, intended to facilitate configuration for BornAgain users who are no MatPlotLib experts.