holoviews.plotting.plotly.element module#

class holoviews.plotting.plotly.element.ColorbarPlot(element, plot=None, **params)[source]#

Bases: ElementPlot

Parameter Definitions


Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, default_span, hooks, padding, show_grid, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.plotly.plot.PlotlyPlot: width, height

holoviews.plotting.plotly.element.ElementPlot: bgcolor, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, xaxis, yaxis, xticks, yticks, aspect, invert_zaxis, labelled, logz, margins, responsive, zlabel, zticks

clim = NumericTuple(default=(nan, nan), label='Clim', length=2)

User-specified colorbar axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.

clim_percentile = ClassSelector(class_=(<class 'int'>, <class 'float'>, <class 'bool'>), default=False, label='Clim percentile')

Percentile value to compute colorscale robust to outliers. If True, uses 2nd and 98th percentile; otherwise uses the specified numerical percentile value.

colorbar = Boolean(default=False, label='Colorbar')

Whether to display a colorbar.

color_levels = ClassSelector(allow_None=True, class_=(<class 'int'>, <class 'list'>), label='Color levels')

Number of discrete colors to use when colormapping or a set of color intervals defining the range of values to map each color to.

colorbar_opts = Dict(class_=<class 'dict'>, default={}, label='Colorbar opts')

Allows setting including borderwidth, showexponent, nticks, outlinecolor, thickness, bgcolor, outlinewidth, bordercolor, ticklen, xpad, ypad, tickangle…

symmetric = Boolean(default=False, label='Symmetric')

Whether to make the colormap symmetric around zero.

class holoviews.plotting.plotly.element.ElementPlot(element, plot=None, **params)[source]#

Bases: PlotlyPlot, GenericElementPlot

Parameter Definitions


Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, default_span, hooks, padding, show_grid, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.plotly.plot.PlotlyPlot: width, height

bgcolor = ClassSelector(allow_None=True, class_=(<class 'str'>, <class 'tuple'>), label='Bgcolor')

If set bgcolor overrides the background color of the axis.

invert_axes = Selector(default=False, label='Invert axes', names={}, objects=[False])

Inverts the axes of the plot. Note that this parameter may not always be respected by all plots but should be respected by adjoined plots when appropriate.

invert_xaxis = Boolean(default=False, label='Invert xaxis')

Whether to invert the plot x-axis.

invert_yaxis = Boolean(default=False, label='Invert yaxis')

Whether to invert the plot y-axis.

logx = Boolean(default=False, label='Logx')

Whether to apply log scaling to the x-axis of the Chart.

logy = Boolean(default=False, label='Logy')

Whether to apply log scaling to the y-axis of the Chart.

show_legend = Boolean(default=False, label='Show legend')

Whether to show legend for the plot.

xaxis = Selector(default='bottom', 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='left', 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’.

xticks = Parameter(allow_None=True, label='Xticks')

Ticks along x-axis specified as an integer, explicit list of tick locations, list of tuples containing the locations.

yticks = Parameter(allow_None=True, label='Yticks')

Ticks along y-axis specified as an integer, explicit list of tick locations, list of tuples containing the locations.

aspect = Parameter(default='cube', label='Aspect')

The aspect ratio mode of the plot. By default, a plot may select its own appropriate aspect ratio but sometimes it may be necessary to force a square aspect ratio (e.g. to display the plot as an element of a grid). The modes ‘auto’ and ‘equal’ correspond to the axis modes of the same name in matplotlib, a numeric value may also be passed.

invert_zaxis = Boolean(default=False, label='Invert zaxis')

Whether to invert the plot z-axis.

labelled = List(bounds=(0, None), default=['x', 'y', 'z'], label='Labelled')

Whether to label the ‘x’ and ‘y’ axes.

logz = Boolean(default=False, label='Logz')

Whether to apply log scaling to the y-axis of the Chart.

margins = NumericTuple(default=(50, 50, 50, 50), label='Margins', length=4)

Margins in pixel values specified as a tuple of the form (left, bottom, right, top).

responsive = Boolean(default=False, label='Responsive')

Whether the plot should stretch to fill the available space.

zlabel = String(allow_None=True, label='Zlabel')

An explicit override of the z-axis label, if set takes precedence over the dimension label.

zticks = Parameter(allow_None=True, label='Zticks')

Ticks along z-axis specified as an integer, explicit list of tick locations, list of tuples containing the locations.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

init_graph(datum, options, index=0, **kwargs)[source]#

Initialize the plotly components that will represent the element

Parameters#

datumdict

An element of the data list returned by the get_data method

optionsdict

Graph options that were returned by the graph_options method

indexint

Index of datum in the original list returned by the get_data method

Returns#

dict

Dictionary of the plotly components that represent the element. Keys may include:

  • ‘traces’: List of trace dicts

  • ‘annotations’: List of annotations dicts

  • ‘images’: List of image dicts

  • ‘shapes’: List of shape dicts

initialize_plot(ranges=None, is_geo=False)[source]#

Initializes a new plot object with the last available frame.

update_frame(key, ranges=None, element=None, is_geo=False)[source]#

Updates an existing plot with data corresponding to the key.

class holoviews.plotting.plotly.element.OverlayPlot(overlay, ranges=None, batched=True, keys=None, group_counter=None, **params)[source]#

Bases: GenericOverlayPlot, ElementPlot

Parameter Definitions


Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, default_span, hooks, padding, show_grid, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.plotly.plot.PlotlyPlot: width, height

holoviews.plotting.plotly.element.ElementPlot: bgcolor, invert_axes, invert_xaxis, invert_yaxis, logx, logy, xaxis, yaxis, xticks, yticks, aspect, invert_zaxis, labelled, logz, margins, responsive, zlabel, zticks

holoviews.plotting.plot.GenericOverlayPlot: show_legend, batched, legend_limit, style_grouping

initialize_plot(ranges=None, is_geo=False)[source]#

Initializes a new plot object with the last available frame.

update_frame(key, ranges=None, element=None, is_geo=False)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.