Expand description
Colorbar component for displaying color-to-value mappings.
A colorbar is a narrow strip showing the gradient of a colormap alongside tick marks and labels indicating the corresponding data values. It is the essential companion to heatmaps and colormap-based scatter plots.
§Examples
use plotkit_core::colorbar::{Colorbar, ColorbarOrientation};
use plotkit_core::colormap::Colormap;
let cb = Colorbar::new(Colormap::Viridis, 0.0, 100.0)
.label("Temperature (C)")
.orientation(ColorbarOrientation::Vertical)
.num_steps(128);Structs§
- Colorbar
- Configuration for a colorbar that maps colors to data values.
Enums§
- Colorbar
Orientation - Orientation of the colorbar gradient strip.
Functions§
- draw_
colorbar - Draws a colorbar into the given rectangle.