holoviews.plotting.mpl.chart module#
- class holoviews.plotting.mpl.chart.AreaPlot(element, **params)[source]#
Bases:
AreaMixin
,ChartPlot
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, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, ztickspadding = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'tuple'>), default=(0, 0.1), 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.
show_legend = Boolean(default=False, label='Show legend')
Whether to show legend for the plot.
- class holoviews.plotting.mpl.chart.BarPlot(*args, **kwargs)[source]#
Bases:
BarsMixin
,ColorbarPlot
,LegendPlot
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, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, zticksholoviews.plotting.mpl.element.LegendPlot
: legend_cols, legend_labels, legend_position, legend_optsholoviews.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, symmetricshow_legend = Boolean(default=True, label='Show legend')
Whether to show legend for the plot.
bar_padding = Number(default=0.2, inclusive_bounds=(True, True), label='Bar padding')
Defines the padding between groups.
multi_level = Boolean(default=True, label='Multi level')
Whether the Bars should be grouped into a second categorical axis level.
stacked = Boolean(default=False, label='Stacked')
Whether the bars should be stacked or grouped.
- class holoviews.plotting.mpl.chart.ChartPlot(element, **params)[source]#
Bases:
ElementPlot
Baseclass to plot Chart elements.
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, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, zticks
- class holoviews.plotting.mpl.chart.CurvePlot(element, **params)[source]#
Bases:
ChartPlot
CurvePlot can plot Curve and ViewMaps of Curve, which can be displayed as a single frame or animation. Axes, titles and legends are automatically generated from dim_info.
If the dimension is set to cyclic in the dim_info it will rotate the curve so that minimum y values are at the minimum x value to make the plots easier to interpret.
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, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, ztickspadding = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'tuple'>), default=(0, 0.1), 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.
show_legend = Boolean(default=True, label='Show legend')
Whether to show legend for the plot.
show_grid = Boolean(default=False, label='Show grid')
Enable axis grid.
autotick = Boolean(default=False, label='Autotick')
Whether to let matplotlib automatically compute tick marks or to allow the user to control tick marks.
interpolation = Selector(default='linear', label='Interpolation', names={}, objects=['linear', 'steps-mid', 'steps-pre', 'steps-post'])
Defines how the samples of the Curve are interpolated, default is ‘linear’, other options include ‘steps-mid’, ‘steps-pre’ and ‘steps-post’.
relative_labels = Boolean(default=False, label='Relative labels')
If plotted quantity is cyclic and center_cyclic is enabled, will compute tick labels relative to the center.
- class holoviews.plotting.mpl.chart.ErrorPlot(*args, **kwargs)[source]#
Bases:
ColorbarPlot
ErrorPlot plots the ErrorBar Element type and supporting both horizontal and vertical error bars via the ‘horizontal’ plot option.
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, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.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, symmetric
- class holoviews.plotting.mpl.chart.HistogramPlot(histograms, **params)[source]#
Bases:
ColorbarPlot
HistogramPlot can plot DataHistograms and ViewMaps of DataHistograms, which can be displayed as a single frame or animation.
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, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.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, symmetric- get_extents(element, 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.
- class holoviews.plotting.mpl.chart.PointPlot(*args, **kwargs)[source]#
Bases:
ChartPlot
,ColorbarPlot
,LegendPlot
Note that the ‘cmap’, ‘vmin’ and ‘vmax’ style arguments control how point magnitudes are rendered to different colors.
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, padding, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, zticksholoviews.plotting.mpl.element.LegendPlot
: show_legend, legend_cols, legend_labels, legend_position, legend_optsholoviews.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, symmetricshow_grid = Boolean(default=False, label='Show grid')
Whether to draw grid lines at the tick positions.
color_index = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'int'>), label='Color index')
Deprecated in favor of color style mapping, e.g. color=dim(‘color’)
size_index = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'int'>), label='Size index')
Deprecated in favor of size style mapping, e.g. size=dim(‘size’)
scaling_method = Selector(default='area', label='Scaling method', names={}, objects=['width', 'area'])
Deprecated in favor of size style mapping, e.g. size=dim(‘size’)**2.
scaling_factor = Number(bounds=(0, None), default=1, inclusive_bounds=(True, True), label='Scaling factor')
Scaling factor which is applied to either the width or area of each point, depending on the value of scaling_method.
size_fn = Callable(default=<ufunc 'absolute'>, label='Size fn')
Function applied to size values before applying scaling, to remove values lower than zero.
- size_fn = <ufunc 'absolute'>#
- class holoviews.plotting.mpl.chart.SideAreaPlot(element, **params)[source]#
Bases:
AdjoinedPlot
,AreaPlot
Parameter Definitions
Parameters inherited from:
holoviews.plotting.plot.DimensionedPlot
: fontsize, fontscale, 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, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, zticksholoviews.plotting.mpl.chart.AreaPlot
: padding, show_legendholoviews.plotting.mpl.plot.AdjoinedPlot
: show_title, aspect, subplot_size, show_xlabelbgcolor = Parameter(default=(1, 1, 1, 0), label='Bgcolor')
Make plot background invisible.
xaxis = Selector(default='bare', label='Xaxis', names={}, objects=['top', 'bottom', 'bare', 'top-bare', 'bottom-bare', None])
Whether and where to display the xaxis, bare options allow suppressing all axis labels including ticks and xlabel. Valid options are ‘top’, ‘bottom’, ‘bare’, ‘top-bare’ and ‘bottom-bare’.
yaxis = Selector(default='bare', label='Yaxis', names={}, objects=['left', 'right', 'bare', 'left-bare', 'right-bare', None])
Whether and where to display the yaxis, bare options allow suppressing all axis labels including ticks and ylabel. Valid options are ‘left’, ‘right’, ‘bare’ ‘left-bare’ and ‘right-bare’.
border_size = Number(default=0, inclusive_bounds=(True, True), label='Border size')
The size of the border expressed as a fraction of the main plot.
- class holoviews.plotting.mpl.chart.SideHistogramPlot(histograms, **params)[source]#
Bases:
AdjoinedPlot
,HistogramPlot
Parameter Definitions
Parameters inherited from:
holoviews.plotting.plot.DimensionedPlot
: fontsize, fontscale, 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, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, 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, symmetricholoviews.plotting.mpl.plot.AdjoinedPlot
: show_title, aspect, border_size, subplot_size, show_xlabelbgcolor = Parameter(default=(1, 1, 1, 0), label='Bgcolor')
Make plot background invisible.
show_grid = Boolean(default=False, label='Show grid')
Whether to overlay a grid on the axis.
offset = Number(bounds=(0, 1), default=0.2, inclusive_bounds=(True, True), label='Offset')
Histogram value offset for a colorbar.
- class holoviews.plotting.mpl.chart.SideSpikesPlot(*args, **kwargs)[source]#
Bases:
AdjoinedPlot
,SpikesPlot
Parameter Definitions
Parameters inherited from:
holoviews.plotting.plot.DimensionedPlot
: fontsize, fontscale, 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_skipholoviews.plotting.plot.GenericElementPlot
: apply_ranges, apply_extents, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, 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, symmetricholoviews.plotting.mpl.path.PathPlot
: show_legendholoviews.plotting.mpl.chart.SpikesPlot
: padding, color_index, positionholoviews.plotting.mpl.plot.AdjoinedPlot
: show_title, aspect, show_xlabelshow_frame = Boolean(default=True, label='Show frame')
Whether or not to show a complete frame around the plot.
bgcolor = Parameter(default=(1, 1, 1, 0), label='Bgcolor')
Make plot background invisible.
xaxis = Selector(default='bare', label='Xaxis', names={}, objects=['top', 'bottom', 'bare', 'top-bare', 'bottom-bare', None])
Whether and where to display the xaxis, bare options allow suppressing all axis labels including ticks and xlabel. Valid options are ‘top’, ‘bottom’, ‘bare’, ‘top-bare’ and ‘bottom-bare’.
yaxis = Selector(default='bare', label='Yaxis', names={}, objects=['left', 'right', 'bare', 'left-bare', 'right-bare', None])
Whether and where to display the yaxis, bare options allow suppressing all axis labels including ticks and ylabel. Valid options are ‘left’, ‘right’, ‘bare’ ‘left-bare’ and ‘right-bare’.
spike_length = Number(default=1, inclusive_bounds=(True, True), label='Spike length')
The length of each spike if Spikes object is one dimensional.
border_size = Number(default=0, inclusive_bounds=(True, True), label='Border size')
The size of the border expressed as a fraction of the main plot.
subplot_size = Number(default=0.1, inclusive_bounds=(True, True), label='Subplot size')
The size subplots as expressed as a fraction of the main plot.
- class holoviews.plotting.mpl.chart.SpikesPlot(*args, **kwargs)[source]#
Bases:
SpikesMixin
,PathPlot
,ColorbarPlot
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, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, 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, symmetricholoviews.plotting.mpl.path.PathPlot
: show_legendpadding = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'tuple'>), default=(0, 0.1), 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.
aspect = Parameter(default='square', label='Aspect')
The aspect ratio mode of the plot. Allows setting an explicit aspect ratio as width/height as well as ‘square’ and ‘equal’ options.
color_index = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'int'>), label='Color index')
Index of the dimension from which the color will the drawn
spike_length = Number(default=0.1, inclusive_bounds=(True, True), label='Spike length')
The length of each spike if Spikes object is one dimensional.
position = Number(default=0.0, inclusive_bounds=(True, True), label='Position')
The position of the lower end of each spike.
- class holoviews.plotting.mpl.chart.SpreadPlot(element, **params)[source]#
Bases:
AreaPlot
SpreadPlot plots the Spread Element type.
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, yrotation, xticks, yticksholoviews.plotting.mpl.element.ElementPlot
: apply_ticks, aspect, data_aspect, invert_zaxis, labelled, logz, xformatter, yformatter, zformatter, zaxis, zlabel, zrotation, ztickspadding = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'tuple'>), default=(0, 0.1), 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.
show_legend = Boolean(default=False, label='Show legend')
Whether to show legend for the plot.
- get_extents(element, 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.
- class holoviews.plotting.mpl.chart.VectorFieldPlot(*args, **kwargs)[source]#
Bases:
ColorbarPlot
Renders vector fields in sheet coordinates. The vectors are expressed in polar coordinates and may be displayed according to angle alone (with some common, arbitrary arrow length) or may be true polar vectors.
The color or magnitude can be mapped onto any dimension using the color_index and size_index.
The length of the arrows is controlled by the ‘scale’ style option. The scaling of the arrows may also be controlled via the normalize_lengths and rescale_lengths plot option, which will normalize the lengths to a maximum of 1 and scale them according to the minimum distance respectively.
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_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticksholoviews.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, symmetricpadding = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'tuple'>), default=0.05, 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.
arrow_heads = Boolean(default=True, label='Arrow heads')
Whether or not to draw arrow heads. If arrowheads are enabled, they may be customized with the ‘headlength’ and ‘headaxislength’ style options.
magnitude = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'holoviews.util.transform.dim'>), label='Magnitude')
Dimension or dimension value transform that declares the magnitude of each vector. Magnitude is expected to be scaled between 0-1, by default the magnitudes are rescaled relative to the minimum distance between vectors, this can be disabled with the rescale_lengths option.
rescale_lengths = Boolean(default=True, label='Rescale lengths')
Whether the lengths will be rescaled to take into account the smallest non-zero distance between two vectors.
color_index = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'int'>), label='Color index')
Deprecated in favor of dimension value transform on color option, e.g. color=dim(‘Magnitude’).
size_index = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'int'>), label='Size index')
Deprecated in favor of the magnitude option, e.g. magnitude=dim(‘Magnitude’).
normalize_lengths = Boolean(default=True, label='Normalize lengths')
Deprecated in favor of rescaling length using dimension value transforms using the magnitude option, e.g. dim(‘Magnitude’).norm().