spyndex.plot.heatmap¶
- spyndex.plot.heatmap(index: str, x: str, y: str, params: dict | None = None, online: bool = False, **kwargs)[source]¶
Plot all posible index values as a color-encoded matrix.
- Parameters:
index (str) – Index to plot.
x (str) – Band to plot in the x-axis.
y (str) – Band to plot in the y-axis.
params (dict) – Parameters for all remaining bands that are not used in
x
nory
. This dictionary must store just float values.online (bool, default = False) – Whether to retrieve the most recent list of indices directly from the GitHub repository and not from the local copy.
**kwargs (Keyword arguments) – Keyword arguments that can be passed to
seaborn.heatmap()
.
- Returns:
Axes object with the index heatmap.
- Return type:
Matplotlib Axes
Examples
>>> import spyndex >>> spyndex.plot.heatmap("NDVI","N","R",cmap = "Spectral",annot = True)
If the index uses more than one band, the remaining bands or parameters must be passed in the
params
dictionary.>>> spyndex.plot.heatmap( ... "SAVI", ... "N", ... "R", ... params = {"L": 0.5}, ... cmap = "Spectral", ... annot = True)