A library for working with phylogenetic and population genetic data.
v0.32.0
HeatmapParameters Struct Reference

#include <genesis/utils/color/heat_map.hpp>

Detailed Description

Definition at line 50 of file heat_map.hpp.

Public Member Functions

 HeatmapParameters (ColorMap const &map)
 Constructor from a ColorMap. More...
 

Public Types

enum  ColorNorm { kLinear, kLogarithmic, kDiverging }
 Type of color normalization to apply. More...
 
enum  NormalizationRange { kAll, kRow, kCol }
 Normalize the colors over the whole matrix, or individually per row or column. More...
 

Public Attributes

ColorMap color_map
 Set the ColorMap with all its properties to use for the heatmap. More...
 
ColorNorm color_norm
 Select which ColorNormalization to apply to the data. More...
 
double max_value = std::numeric_limits<double>::quiet_NaN()
 Maximum value to use for the color normalization. More...
 
double min_value = std::numeric_limits<double>::quiet_NaN()
 Minimum value to use for the color normalization. More...
 
NormalizationRange normalization_range = NormalizationRange::kAll
 Range about which to calculate the min and max value for the normalization. More...
 

Constructor & Destructor Documentation

◆ HeatmapParameters()

HeatmapParameters ( ColorMap const &  map)
inline

Constructor from a ColorMap.

Just uses that color map, and leaves the other parameters at their defaults, which should be reasonable in most situations anway.

Definition at line 94 of file heat_map.hpp.

Member Enumeration Documentation

◆ ColorNorm

enum ColorNorm
strong

Type of color normalization to apply.

We currently only offer linear, logarithmic, and diverging. Need to refactor in the future to move away from an enum, and offer a more flexible way of providing the designed ColorNormalization.

When selecting diverging here, because of how this works as of now, we use mid-point centering. In order to make sure that the mid point is, e.g., at 0, the user hence needs to provide the min_value and max_value here, so that that they are symmetrical around 0.

Enumerator
kLinear 
kLogarithmic 
kDiverging 

Definition at line 67 of file heat_map.hpp.

◆ NormalizationRange

enum NormalizationRange
strong

Normalize the colors over the whole matrix, or individually per row or column.

Enumerator
kAll 
kRow 
kCol 

Definition at line 77 of file heat_map.hpp.

Member Data Documentation

◆ color_map

ColorMap color_map

Set the ColorMap with all its properties to use for the heatmap.

Definition at line 111 of file heat_map.hpp.

◆ color_norm

ColorNorm color_norm

Select which ColorNormalization to apply to the data.

Definition at line 116 of file heat_map.hpp.

◆ max_value

double max_value = std::numeric_limits<double>::quiet_NaN()

Maximum value to use for the color normalization.

See min_value for details. Same here, but for the max.

Definition at line 146 of file heat_map.hpp.

◆ min_value

double min_value = std::numeric_limits<double>::quiet_NaN()

Minimum value to use for the color normalization.

By default, this is set to NaN, meaning that the minimum value for the ColorNormalization is dermined by the values in the matrix, according to NormalizationRange. However, when setting this to a finite value, this is used instead as the min, and not obtained from the data. Same for max_value.

Definition at line 139 of file heat_map.hpp.

◆ normalization_range

Range about which to calculate the min and max value for the normalization.

By default, we set the min and max value for the normalization using the whole matrix. Using this, instead values can be normalized per row or per column instead, so that the min and max values of each row/column are used to set up the normalization of ranges. See ColorNormalization.

Also note that the settings min_value and max_value in this class can be used to set fixed values instead, by setting them to the desired values.

Definition at line 129 of file heat_map.hpp.


The documentation for this struct was generated from the following file: