visualise_heatmap#
- visualise_heatmap(domain, heatmap, ax=None, colorbar_limit=None, heatmap_cmap='Reds', colorbar_label='Density', heatmap_zorder=0, objects_to_plot=False, add_cbar=True, visualise_kwargs={}, figure_kwargs={})#
Visualise a heatmap over a given domain.
- Parameters:
- domainobject
The domain object containing the bounding box information.
- heatmaparray-like
The heatmap data to be visualized.
- axmatplotlib.axes.Axes, optional
The axes on which to plot the heatmap. If None, a new figure and axes are created.
- colorbar_limit{None, ‘auto’, list, tuple, int, float}, optional
The limits for the colorbar. If None or ‘auto’, the limits are set to the maximum absolute value of the heatmap. If a list or tuple, it must be of length 2 specifying the lower and upper bounds. If an int or float, the limits are set to the negative and positive value of the absolute value.
- heatmap_cmapstr, optional
The colormap to use for the heatmap. Default is ‘Reds’.
- colorbar_labelstr, optional
The label for the colorbar. Default is ‘Density’.
- heatmap_zorderint, optional
The z-order for the heatmap plot. Default is 10.
- objects_to_plotbool or object, optional
If not False, additional objects to plot on the domain. Default is False.
- add_cbarbool, optional
If True, add a colorbar. Defaults to True.
- visualise_kwargsdict, optional
Additional keyword arguments to pass to the
visualise
function if objects_to_plot is not False.- figure_kwargsdict, optional
Additional keyword arguments for the figure (default is {}).
- Returns:
- figmatplotlib.figure.Figure
The figure object containing the plot.
- axmatplotlib.axes.Axes
The axes object containing the plot.
- Raises:
- ValueError
If colorbar_limit is not None, ‘auto’, a list, tuple, int, or float, or if it is a list or tuple of length not equal to 2.