get_isosurface_colors¶
- ifermi.plot.get_isosurface_colors(colors, fermi_object, spins, plot_index)[source]¶
Get colors for each Fermi surface.
- Parameters:
colors (
str
|dict
|list
|None
) –The color specification. Valid options are:
A single color to use for all Fermi surfaces, specified as a tuple of rgb values from 0 to 1. E.g., red would be
(1, 0, 0)
.A list of colors, specified as above.
A dictionary of
{Spin.up: color1, Spin.down: color2}
, where the colors are specified as above.A string specifying which matplotlib colormap to use. See https://matplotlib.org/tutorials/colors/colormaps.html for more information.
None
, in which case the default colors will be used.
fermi_object (
FermiSurface
|FermiSlice
) – A Fermi surface or Fermi slice object.spins (
list
[Spin
]) – A list of spins for which colors will be generated.plot_index (
list
[int
] |dict
[Spin
,list
[int
] |int
] |int
) –A choice of band indices (0-based). Valid options are:
A single integer, which will select that band index in both spin channels (if both spin channels are present).
A list of integers, which will select that set of bands from both spin channels (if both are present).
A dictionary of
{Spin.up: band_index_1, Spin.down: band_index_2}
, where band_index_1 and band_index_2 are either single integers (if one wishes to plot a single band for that particular spin) or a list of integers. Note that the choice of integer and list can be different for different spin channels.None
in which case all bands will be selected.
- Return type:
- Returns:
The colors as a list of tuples, where each color is specified as the rgb values from 0 to 1. E.g., red would be
(1, 0, 0)
.