graphinglib.Heatmap#
- class graphinglib.Heatmap(image: ArrayLike | str, x_axis_range: tuple[float, float] | None = None, y_axis_range: tuple[float, float] | None = None, color_map: str | Colormap = 'default', show_color_bar: bool | Literal['default'] = 'default', alpha_value: float = 1.0, aspect_ratio: str | float = 'default', origin_position: str = 'default', interpolation: str = 'none')[source]#
The class implements heatmaps.
- Parameters:
- imageArrayLike or str
Image to display as an array of values or from a file.
- x_axis_range, y_axis_rangetuple[float, float], optional
The range of x and y values used for the axes as tuples containing the start and end of the range.
- color_mapstr, Colormap
The color map to use for the
Heatmap
. Can either be specified as a string (named colormap from Matplotlib) or a Colormap object. Default depends on thefigure_style
configuration.- show_color_barbool
Whether or not to display the color bar next to the plot. Defaults to
True
.- alpha_valuefloat
Opacity value of the
Heatmap
. Defaults to 1.0.- aspect_ratiostr or float
Aspect ratio of the axes. Default depends on the
figure_style
configuration.- origin_positionstr
Position of the origin of the axes (upper left or lower left corner). Default depends on the
figure_style
configuration.- interpolationstr
Interpolation method to be applied to the image. Defaults to
"none"
.See also
For other interpolation methods, refer to Interpolations for imshow.
Methods
__init__
(image[, x_axis_range, ...])The class implements heatmaps.
copy
()Returns a deep copy of the
Heatmap
.from_function
(func, x_axis_range, y_axis_range)Creates a heatmap from a function.
from_points
(points, values, x_axis_range, ...)Creates a heatmap by interpolating unevenly distributed data points on a grid.