holoviews.plotting.mpl.heatmap module#
- class holoviews.plotting.mpl.heatmap.HeatMapPlot(*args, **kwargs)[source]#
Bases:
HeatMapMixin
,QuadMeshPlot
Parameter Definitions
Parameters inherited from:
holoviews.plotting.plot.DimensionedPlot
: fontsize, fontscale, show_title, title, normalizeholoviews.plotting.mpl.plot.MPLPlot
: projection, backend_opts, fig_alpha, fig_bounds, fig_inches, fig_latex, fig_rcparams, fig_size, initial_hooks, sublabel_format, sublabel_offset, sublabel_position, sublabel_size, sublabel_skip, show_frameholoviews.plotting.plot.GenericElementPlot
: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotationholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, zticksholoviews.plotting.mpl.element.ColorbarPlot
: clabel, clim, clim_percentile, cformatter, colorbar, colorbar_opts, color_levels, cnorm, cbar_padding, cbar_ticks, cbar_width, cbar_extend, rescale_discrete_levels, symmetricholoviews.plotting.mpl.raster.QuadMeshPlot
: show_legend, nodatapadding = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'tuple'>), default=0, label='Padding')
Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.
xticks = Parameter(default=20, label='Xticks')
Ticks along x-axis/segments specified as an integer, explicit list of ticks or function. If None, no ticks are shown.
yticks = Parameter(default=20, label='Yticks')
Ticks along y-axis/annulars specified as an integer, explicit list of ticks or function. If None, no ticks are shown.
clipping_colors = Dict(class_=<class 'dict'>, default={'NaN': 'white'}, label='Clipping colors')
Dictionary to specify colors for clipped values, allows setting color for NaN values and for values above and below the min and max value. The min, max or NaN color may specify an RGB(A) color as a color hex string of the form #FFFFFF or #FFFFFFFF or a length 3 or length 4 tuple specifying values in the range 0-1 or a named HTML color.
radial = Boolean(default=False, label='Radial')
Whether the HeatMap should be radial
show_values = Boolean(default=False, label='Show values')
Whether to annotate each pixel with its value.
xmarks = Parameter(allow_None=True, label='Xmarks')
Add separation lines to the heatmap for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given categorical values. If parameter is of type function, draw separation lines where function returns True for passed heatmap category.
ymarks = Parameter(allow_None=True, label='Ymarks')
Add separation lines to the heatmap for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given categorical values. If parameter is of type function, draw separation lines where function returns True for passed heatmap category.
- class holoviews.plotting.mpl.heatmap.RadialHeatMapPlot(*args, **kwargs)[source]#
Bases:
ColorbarPlot
Parameter Definitions
Parameters inherited from:
holoviews.plotting.plot.DimensionedPlot
: fontsize, fontscale, show_title, title, normalizeholoviews.plotting.mpl.plot.MPLPlot
: backend_opts, fig_alpha, fig_bounds, fig_inches, fig_latex, fig_rcparams, fig_size, initial_hooks, sublabel_format, sublabel_offset, sublabel_position, sublabel_size, sublabel_skip, show_frameholoviews.plotting.plot.GenericElementPlot
: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotationholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, zticksholoviews.plotting.mpl.element.ColorbarPlot
: clabel, clim, clim_percentile, cformatter, colorbar, colorbar_opts, color_levels, cnorm, clipping_colors, cbar_padding, cbar_ticks, cbar_width, cbar_extend, rescale_discrete_levels, symmetricprojection = Selector(default='polar', label='Projection', names={}, objects=['polar'])
The projection of the plot axis, default of None is equivalent to 2D plot, ‘3d’ and ‘polar’ are also supported by matplotlib by default. May also supply a custom projection that is either a matplotlib projection type or implements the _as_mpl_axes method.
xticks = Parameter(default=4, label='Xticks')
Ticks along x-axis/segments specified as an integer, explicit list of ticks or function. If None, no ticks are shown.
yticks = Parameter(default=4, label='Yticks')
Ticks along y-axis/annulars specified as an integer, explicit list of ticks or function. If None, no ticks are shown.
start_angle = Number(default=1.5707963267948966, inclusive_bounds=(True, True), label='Start angle')
Define starting angle of the first annulars. By default, beings at 12 o clock.
max_radius = Number(default=0.5, inclusive_bounds=(True, True), label='Max radius')
Define the maximum radius which is used for the x and y range extents.
radius_inner = Number(bounds=(0, 0.5), default=0.1, inclusive_bounds=(True, True), label='Radius inner')
Define the radius fraction of inner, empty space.
radius_outer = Number(bounds=(0, 1), default=0.05, inclusive_bounds=(True, True), label='Radius outer')
Define the radius fraction of outer space including the labels.
radial = Boolean(default=True, label='Radial')
Whether the HeatMap should be radial
show_values = Boolean(default=False, label='Show values')
Whether to annotate each pixel with its value.
xmarks = Parameter(allow_None=True, label='Xmarks')
Add separation lines between segments for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across radial heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given segment values. If parameter is of type function, draw separation lines where function returns True for passed segment value.
ymarks = Parameter(allow_None=True, label='Ymarks')
Add separation lines between annulars for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across radial heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given annular values. If parameter is of type function, draw separation lines where function returns True for passed annular value.
- get_extents(view, ranges, range_type='combined', **kwargs)[source]#
Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.
The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:
‘data’: Just the data ranges
‘extents’: Element.extents
‘soft’: Dimension.soft_range values
‘hard’: Dimension.range values
To obtain the combined range, which includes range padding the default may be used:
‘combined’: All the range types combined and padding applied
This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.
If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.