holoviews.operation.datashader module#
- class holoviews.operation.datashader.AggregationOperation(*, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
ResampleOperation2D
AggregationOperation extends the ResampleOperation2D defining an aggregator parameter used to define a datashader Reduction.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeaggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default=<datashader.reductions.count object at 0x122f32790>, label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
selector = ClassSelector(allow_None=True, class_=(<class 'datashader.reductions.min'>, <class 'datashader.reductions.max'>, <class 'datashader.reductions.first'>, <class 'datashader.reductions.last'>), label='Selector')
Selector is a datashader reduction function used for selecting data. The selector only works with aggregators which selects an item from the original data. These selectors are min, max, first and last.
vdim_prefix = String(allow_None=True, default='{kdims} ', label='Vdim prefix')
Prefix to prepend to value dimension name where {kdims} templates in the names of the input element key dimensions.
- class holoviews.operation.datashader.LineAggregationOperation(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
AggregationOperation
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefixline_width = Number(allow_None=True, bounds=(0, None), inclusive_bounds=(True, True), label='Line width')
Width of the line to draw, in pixels. If zero, the default, lines are drawn using a simple algorithm with a blocky single-pixel width based on whether the line passes through each pixel or does not. If greater than one, lines are drawn with the specified width using a slower and more complex antialiasing algorithm with fractional values along each edge, so that lines have a more uniform visual appearance across all angles. Line widths between 0 and 1 effectively use a line_width of 1 pixel but with a proportionate reduction in the strength of each pixel, approximating the visual appearance of a subpixel line width.
- class holoviews.operation.datashader.SpreadingOperation(*, how, shape, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
LinkableOperation
Spreading expands each pixel in an Image based Element a certain number of pixels on all sides according to a given shape, merging pixels using a specified compositing operator. This can be useful to make sparse plots more visible.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, streamsholoviews.operation.resample.LinkableOperation
: link_inputshow = Selector(label='How', names={}, objects=[None, 'source', 'over', 'saturate', 'add', 'max', 'min'])
The name of the compositing operator to use when combining pixels. Default of None uses ‘over’ operator for RGB elements and ‘add’ operator for aggregate arrays.
shape = Selector(default='circle', label='Shape', names={}, objects=['circle', 'square'])
The shape to spread by. Options are ‘circle’ [default] or ‘square’.
- class holoviews.operation.datashader.aggregate(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
LineAggregationOperation
aggregate implements 2D binning for any valid HoloViews Element type using datashader. I.e., this operation turns a HoloViews Element or overlay of Elements into an Image or an overlay of Images by rasterizing it. This allows quickly aggregating large datasets computing a fixed-sized representation independent of the original dataset size.
By default it will simply count the number of values in each bin but other aggregators can be supplied implementing mean, max, min and other reduction operations.
The bins of the aggregate are defined by the width and height and the x_range and y_range. If x_sampling or y_sampling are supplied the operation will ensure that a bin is no smaller than the minimum sampling distance by reducing the width and height when zoomed in beyond the minimum sampling distance.
By default, the PlotSize stream is applied when this operation is used dynamically, which means that the height and width will automatically be set to match the inner dimensions of the linked plot.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_width
- class holoviews.operation.datashader.area_aggregate(*, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
AggregationOperation
Aggregates Area elements by filling the area between zero and the y-values if only one value dimension is defined and the area between the curves if two are provided.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefix
- class holoviews.operation.datashader.bundle_graph(*, split, dynamic, group, input_ranges, link_inputs, streams, accuracy, advect_iterations, batch_size, decay, initial_bandwidth, iterations, max_segment_length, min_segment_length, tension, use_dask, include_edge_id, source, target, weight, x, y, name)[source]#
Bases:
_connect_edges
,hammer_bundle
Iteratively group edges and return as paths suitable for datashading.
Breaks each edge into a path with multiple line segments, and iteratively curves this path to bundle edges into groups.
Parameter Definitions
Parameters inherited from:
datashader.bundling.connect_edges
: x, y, source, target, include_edge_iddatashader.bundling.hammer_bundle
: weight, initial_bandwidth, decay, iterations, batch_size, tension, accuracy, advect_iterations, min_segment_length, max_segment_length, use_daskholoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputs, streamsholoviews.operation.datashader._connect_edges
: split
- class holoviews.operation.datashader.contours_rasterize(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
aggregate
Rasterizes the Contours element by weighting the aggregation by the iso-contour levels if a value dimension is defined, otherwise default to any aggregator.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_widthaggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default=<datashader.reductions.mean object at 0x12306ef10>, label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
- class holoviews.operation.datashader.curve_aggregate(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
aggregate
Optimized aggregation for Curve objects by setting the default of the aggregator to self_intersect=False to be more consistent with the appearance of non-aggregated curves.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_widthaggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default=<datashader.reductions.count object at 0x12293f610>, label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
- class holoviews.operation.datashader.datashade(*, interpolation, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, alpha, clims, cmap, cnorm, color_key, min_alpha, rescale_discrete_levels, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
-
Applies the aggregate and shade operations, aggregating all elements in the supplied object and then applying normalization and colormapping the aggregated data returning RGB elements.
See aggregate and shade operations for more details.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.datashader.shade
: alpha, cmap, color_key, cnorm, clims, min_alpha, rescale_discrete_levelsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.rasterize
: aggregator, interpolation
- class holoviews.operation.datashader.directly_connect_edges(*, split, dynamic, group, input_ranges, link_inputs, streams, include_edge_id, source, target, weight, x, y, name)[source]#
Bases:
_connect_edges
,connect_edges
Given a Graph object will directly connect all nodes.
Parameter Definitions
Parameters inherited from:
datashader.bundling.connect_edges
: x, y, source, target, weight, include_edge_idholoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputs, streamsholoviews.operation.datashader._connect_edges
: split
- class holoviews.operation.datashader.dynspread(*, max_px, threshold, how, shape, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
SpreadingOperation
Spreading expands each pixel in an Image based Element a certain number of pixels on all sides according to a given shape, merging pixels using a specified compositing operator. This can be useful to make sparse plots more visible. Dynamic spreading determines how many pixels to spread based on a density heuristic.
See the datashader documentation for more detail:
https://datashader.org/api.html#datashader.transfer_functions.dynspread
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, streamsholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.datashader.SpreadingOperation
: how, shapemax_px = Integer(default=3, inclusive_bounds=(True, True), label='Max px')
Maximum number of pixels to spread on all sides.
threshold = Number(bounds=(0, 1), default=0.5, inclusive_bounds=(True, True), label='Threshold')
When spreading, determines how far to spread. Spreading starts at 1 pixel, and stops when the fraction of adjacent non-empty pixels reaches this threshold. Higher values give more spreading, up to the max_px allowed.
- class holoviews.operation.datashader.geom_aggregate(*, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
AggregationOperation
Baseclass for aggregation of Geom elements.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefix
- class holoviews.operation.datashader.geometry_rasterize(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
LineAggregationOperation
Rasterizes geometries by converting them to spatialpandas.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_widthaggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default=<datashader.reductions.mean object at 0x1230848d0>, label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
- class holoviews.operation.datashader.inspect(*, hits, max_indicators, null_value, pixels, transform, value_bounds, x, y, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
Operation
Generalized inspect operation that detects the appropriate indicator type.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputsstreams = ClassSelector(class_=(<class 'dict'>, <class 'list'>), default={'x': <param.parameters.ClassSelector object at 0x116b49900>, 'y': <param.parameters.ClassSelector object at 0x116b49850>}, label='Streams')
List of streams that are applied if dynamic=True, allowing for dynamic interaction with the plot.
pixels = ClassSelector(class_=(<class 'int'>, <class 'tuple'>), default=3, label='Pixels')
Number of pixels in data space around the cursor point to search for hits in. The hit within this box mask that is closest to the cursor’s position is displayed. Pixels can be provided as integer or x/y-tuple to perform asymmetric masking.
null_value = Number(default=0, inclusive_bounds=(True, True), label='Null value')
Value of raster which indicates no hits. For instance zero for count aggregator (default) and commonly NaN for other (float) aggregators. For RGBA images, the alpha channel is used which means zero alpha acts as the null value.
value_bounds = NumericTuple(allow_None=True, label='Value bounds', length=2)
If not None, a numeric bounds for the pixel under the cursor in order for hits to be computed. Useful for count aggregators where a value of (1,1000) would make sure no more than a thousand samples will be searched.
hits = DataFrame(allow_None=True, class_=<class 'pandas.core.frame.DataFrame'>, default=Empty DataFrame Columns: [] Index: [], label='Hits')
max_indicators = Integer(default=1, inclusive_bounds=(True, True), label='Max indicators')
Maximum number of indicator elements to display within the mask of size pixels. Points are prioritized by distance from the cursor point. This means that the default value of one shows the single closest sample to the cursor. Note that this limit is not applies to the hits parameter.
transform = Callable(label='Transform')
Function that transforms the hits dataframe before it is passed to the Points element. Can be used to customize the value dimensions e.g. to implement custom hover behavior.
x = Number(allow_None=True, inclusive_bounds=(True, True), label='X')
x-position to inspect.
y = Number(allow_None=True, inclusive_bounds=(True, True), label='Y')
y-position to inspect.
- class holoviews.operation.datashader.inspect_base(*, hits, max_indicators, null_value, pixels, transform, value_bounds, x, y, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
inspect
Given datashaded aggregate (Image) output, return a set of (hoverable) points sampled from those near the cursor.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputsholoviews.operation.datashader.inspect
: streams, pixels, null_value, value_bounds, hits, max_indicators, transform, x, y
- class holoviews.operation.datashader.inspect_mask(*, pixels, x, y, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
Operation
Operation used to display the inspection mask, for use with other inspection operations. Can be used directly but is more commonly constructed using the mask property of the corresponding inspector operation.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputsstreams = ClassSelector(class_=(<class 'dict'>, <class 'list'>), default=[<class 'holoviews.streams.PointerXY'>], label='Streams')
List of streams that are applied if dynamic=True, allowing for dynamic interaction with the plot.
pixels = ClassSelector(class_=(<class 'int'>, <class 'tuple'>), default=3, label='Pixels')
Size of the mask that should match the pixels parameter used in the associated inspection operation. Pixels can be provided as integer or x/y-tuple to perform asymmetric masking.
x = Number(default=0, inclusive_bounds=(True, True), label='X')
y = Number(default=0, inclusive_bounds=(True, True), label='Y')
- class holoviews.operation.datashader.inspect_points(*, hits, max_indicators, null_value, pixels, transform, value_bounds, x, y, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
inspect_base
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputsholoviews.operation.datashader.inspect
: streams, pixels, null_value, value_bounds, hits, max_indicators, transform, x, y
- class holoviews.operation.datashader.inspect_polygons(*, hits, max_indicators, null_value, pixels, transform, value_bounds, x, y, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
inspect_base
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputsholoviews.operation.datashader.inspect
: streams, pixels, null_value, value_bounds, hits, max_indicators, transform, x, y
- class holoviews.operation.datashader.overlay_aggregate(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
aggregate
Optimized aggregation for NdOverlay objects by aggregating each Element in an NdOverlay individually avoiding having to concatenate items in the NdOverlay. Works by summing sum and count aggregates and applying appropriate masking for NaN values. Mean aggregation is also supported by dividing sum and count aggregates. count_cat aggregates are grouped by the categorical dimension and a separate aggregate for each category is generated.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_width
- class holoviews.operation.datashader.quadmesh_rasterize(*, interpolation, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
trimesh_rasterize
Rasterize the QuadMesh element using the supplied aggregator. Simply converts to a TriMesh and lets trimesh_rasterize handle the actual rasterization.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_widthholoviews.operation.datashader.trimesh_rasterize
: aggregator, interpolation
- class holoviews.operation.datashader.rasterize(*, interpolation, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
AggregationOperation
Rasterize is a high-level operation that will rasterize any Element or combination of Elements, aggregating them with the supplied aggregator and interpolation method.
The default aggregation method depends on the type of Element but usually defaults to the count of samples in each bin. Other aggregators can be supplied implementing mean, max, min and other reduction operations.
The bins of the aggregate are defined by the width and height and the x_range and y_range. If x_sampling or y_sampling are supplied the operation will ensure that a bin is no smaller than the minimum sampling distance by reducing the width and height when zoomed in beyond the minimum sampling distance.
By default, the PlotSize and RangeXY streams are applied when this operation is used dynamically, which means that the width, height, x_range and y_range will automatically be set to match the inner dimensions of the linked plot and the ranges of the axes.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixaggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default='default', label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
interpolation = Selector(default='default', label='Interpolation', names={}, objects=['default', 'linear', 'nearest', 'bilinear', None, False])
The interpolation method to apply during rasterization. Default depends on element type
- class holoviews.operation.datashader.rectangle_aggregate(*, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
geom_aggregate
Aggregates Rectangle elements.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefix
- class holoviews.operation.datashader.regrid(*, interpolation, upsample, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
AggregationOperation
regrid allows resampling a HoloViews Image type using specified up- and downsampling functions defined using the aggregator and interpolation parameters respectively. By default upsampling is disabled to avoid unnecessarily upscaling an image that has to be sent to the browser. Also disables expanding the image beyond its original bounds avoiding unnecessarily padding the output array with NaN values.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixexpand = Boolean(default=False, label='Expand')
Whether the x_range and y_range should be allowed to expand beyond the extent of the data. Setting this value to True is useful for the case where you want to ensure a certain size of output grid, e.g. if you are doing masking or other arithmetic on the grids. A value of False ensures that the grid is only just as large as it needs to be to contain the data, which will be faster and use less memory if the resulting aggregate is being overlaid on a much larger background.
aggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default=<datashader.reductions.mean object at 0x12306ee50>, label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
interpolation = Selector(default='nearest', label='Interpolation', names={}, objects=['linear', 'nearest', 'bilinear', None, False])
Interpolation method
upsample = Boolean(default=False, label='Upsample')
Whether to allow upsampling if the source array is smaller than the requested array. Setting this value to True will enable upsampling using the interpolation method, when the requested width and height are larger than what is available on the source grid. If upsampling is disabled (the default) the width and height are clipped to what is available on the source array.
- class holoviews.operation.datashader.segments_aggregate(*, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
geom_aggregate
,LineAggregationOperation
Aggregates Segments elements.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_width
- class holoviews.operation.datashader.shade(*, alpha, clims, cmap, cnorm, color_key, min_alpha, rescale_discrete_levels, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
LinkableOperation
shade applies a normalization function followed by colormapping to an Image or NdOverlay of Images, returning an RGB Element. The data must be in the form of a 2D or 3D DataArray, but NdOverlays of 2D Images will be automatically converted to a 3D array.
In the 2D case data is normalized and colormapped, while a 3D array representing categorical aggregates will be supplied a color key for each category. The colormap (cmap) for the 2D case may be supplied as an Iterable or a Callable.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, streamsholoviews.operation.resample.LinkableOperation
: link_inputsalpha = Integer(bounds=(0, 255), default=255, inclusive_bounds=(True, True), label='Alpha')
Value between 0 - 255 representing the alpha value to use for colormapped pixels that contain data (i.e. non-NaN values). Regardless of this value,
NaN
values are set to be fully transparent when doing colormapping.cmap = ClassSelector(allow_None=True, class_=(<class 'collections.abc.Iterable'>, <class 'collections.abc.Callable'>, <class 'dict'>), label='Cmap')
Iterable or callable which returns colors as hex colors or web color names (as defined by datashader), to be used for the colormap of single-layer datashader output. Callable type must allow mapping colors between 0 and 1. The default value of None reverts to Datashader’s default colormap.
color_key = ClassSelector(allow_None=True, class_=(<class 'collections.abc.Iterable'>, <class 'collections.abc.Callable'>, <class 'dict'>), label='Color key')
Iterable or callable that returns colors as hex colors, to be used for the color key of categorical datashader output. Callable type must allow mapping colors for supplied values between 0 and 1.
cnorm = ClassSelector(class_=(<class 'str'>, <class 'collections.abc.Callable'>), default='eq_hist', label='Cnorm')
The normalization operation applied before colormapping. Valid options include ‘linear’, ‘log’, ‘eq_hist’, ‘cbrt’, and any valid transfer function that accepts data, mask, nbins arguments.
clims = NumericTuple(allow_None=True, label='Clims', length=2)
Min and max data values to use for colormap interpolation, when wishing to override autoranging.
min_alpha = Number(bounds=(0, 255), default=40, inclusive_bounds=(True, True), label='Min alpha')
The minimum alpha value to use for non-empty pixels when doing colormapping, in [0, 255]. Use a higher value to avoid undersaturation, i.e. poorly visible low-value datapoints, at the expense of the overall dynamic range..
rescale_discrete_levels = Boolean(default=True, label='Rescale discrete levels')
If
cnorm='eq_hist
and there are only a few discrete values, thenrescale_discrete_levels=True
(the default) decreases the lower limit of the autoranged span so that the values are rendering towards the (more visible) top of thecmap
range, thus avoiding washout of the lower values. Has no effect ifcnorm!=`eq_hist
. Set this value to False if you need to match historical unscaled behavior, prior to HoloViews 1.14.4.
- class holoviews.operation.datashader.spikes_aggregate(*, offset, spike_length, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
LineAggregationOperation
Aggregates Spikes elements by drawing individual line segments over the entire y_range if no value dimension is defined and between zero and the y-value if one is defined.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_widthspike_length = Number(allow_None=True, inclusive_bounds=(True, True), label='Spike length')
If numeric, specifies the length of each spike, overriding the vdims values (if present).
offset = Number(default=0.0, inclusive_bounds=(True, True), label='Offset')
The offset of the lower end of each spike.
- holoviews.operation.datashader.split_dataframe(path_df)[source]#
Splits a dataframe of paths separated by NaNs into individual dataframes.
- class holoviews.operation.datashader.spread(*, px, how, shape, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
SpreadingOperation
Spreading expands each pixel in an Image based Element a certain number of pixels on all sides according to a given shape, merging pixels using a specified compositing operator. This can be useful to make sparse plots more visible.
See the datashader documentation for more detail:
https://datashader.org/api.html#datashader.transfer_functions.spread
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, streamsholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.datashader.SpreadingOperation
: how, shapepx = Integer(default=1, inclusive_bounds=(True, True), label='Px')
Number of pixels to spread on all sides.
- class holoviews.operation.datashader.spread_aggregate(*, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
area_aggregate
Aggregates Spread elements by filling the area between the lower and upper error band.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: aggregator, selector, vdim_prefix
- class holoviews.operation.datashader.stack(*, compositor, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
Operation
The stack operation allows compositing multiple RGB Elements using the defined compositing operator.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, dynamic, input_ranges, link_inputs, streamscompositor = Selector(default='over', label='Compositor', names={}, objects=['add', 'over', 'saturate', 'source'])
Defines how the compositing operation combines the images
- class holoviews.operation.datashader.trimesh_rasterize(*, interpolation, line_width, aggregator, selector, vdim_prefix, element_type, expand, precompute, target, y_range, y_sampling, height, pixel_ratio, width, x_range, x_sampling, dynamic, group, input_ranges, link_inputs, streams, name)[source]#
Bases:
aggregate
Rasterize the TriMesh element using the supplied aggregator. If the TriMesh nodes or edges define a value dimension, will plot filled and shaded polygons; otherwise returns a wiremesh of the data.
Parameter Definitions
Parameters inherited from:
holoviews.core.operation.Operation
: group, input_rangesholoviews.operation.resample.LinkableOperation
: link_inputsholoviews.operation.resample.ResampleOperation1D
: x_range, x_sampling, width, height, pixel_ratioholoviews.operation.resample.ResampleOperation2D
: dynamic, streams, expand, y_range, y_sampling, target, element_type, precomputeholoviews.operation.datashader.AggregationOperation
: selector, vdim_prefixholoviews.operation.datashader.LineAggregationOperation
: line_widthaggregator = ClassSelector(class_=(<class 'datashader.reductions.Reduction'>, <class 'datashader.reductions.summary'>, <class 'str'>), default=<datashader.reductions.mean object at 0x1230840d0>, label='Aggregator')
Datashader reduction function used for aggregating the data. The aggregator may also define a column to aggregate; if no column is defined the first value dimension of the element will be used. May also be defined as a string.
interpolation = Selector(default='bilinear', label='Interpolation', names={}, objects=['bilinear', 'linear', None, False])
The interpolation method to apply during rasterization.