File: heatmap.md

package info (click to toggle)
bornagain 23.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,948 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (24 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
+++
title = "Heat map"
weight = 63
+++

# Heat map

MatPlotLib supports various color schemes for plotting color-coded pixel values in 2d,
see the
[MatPlotLib color schemes tutorial](https://matplotlib.org/stable/tutorials/colors/colormaps.html).

It is generally recommended to use one of the five "perceptually uniform sequential" color schemes:
![MatPlotLib perceptually uniform sequential color schemes](/img/matplotlib_pus_colormaps.png "Perceptually uniform sequential color schemes from MatPlotLib.")

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](https://matplotlib.org/stable/users/explain/customizing.html)
is ignored.
This is a concious choice, intended to facilitate configuration for BornAgain users
who are no MatPlotLib experts.