holoviews.plotting Package ¶
plotting
Package
¶
HoloViews plotting sub-system the defines the interface to be used by any third-party plotting/rendering package.
This file defines the HTML tags used to wrap rendered output for display in the IPython Notebook (optional).
-
class
holoviews.plotting.
Plot
( **params ) [source] ¶ -
Bases:
param.parameterized.Parameterized
Base class of all Plot classes in HoloViews, designed to be general enough to use any plotting package or backend.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
update
( key ) [source] ¶ -
Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
-
class
holoviews.plotting.
Cycle
( cycle=None , **params ) [source] ¶ -
Bases:
param.parameterized.Parameterized
A simple container class that specifies cyclic options. A typical example would be to cycle the curve colors in an Overlay composed of an arbitrary number of curves. The values may be supplied as an explicit list or a key to look up in the default cycles attribute.
-
param String
key
( allow_None=True, basestring=<class ‘str’>, constant=False, default=default_colors, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The key in the default_cycles dictionary used to specify the color cycle if values is not supplied.
-
param List
values
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The values the cycle will iterate over.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.options.Cycle'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.options.Cycle'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.options.Cycle'>) ¶
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.options.Cycle'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.options.Cycle'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.options.Cycle'>) ¶
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param String
-
class
holoviews.plotting.
Renderer
( **params ) [source] ¶ -
Bases:
holoviews.core.io.Exporter
The job of a Renderer is to turn the plotting state held within Plot classes into concrete, visual output in the form of the PNG, SVG, MP4 or WebM formats (among others). Note that a Renderer is a type of Exporter and must therefore follow the Exporter interface.
The Renderer needs to be able to use the .state property of the appropriate Plot classes associated with that renderer in order to generate output. The process of ‘drawing’ is execute by the Plots and the Renderer turns the final plotting state into output.
-
param Callable
key_fn
( allow_None=True, constant=True, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Renderers do not support the saving of object key metadata
-
param Callable
info_fn
( allow_None=True, constant=True, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Renderers do not support the saving of object info metadata
-
param String
backend
( allow_None=False, basestring=<class ‘str’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The full, lowercase name of the rendering backend or third part plotting package used e.g ‘matplotlib’ or ‘cairo’.
-
param Integer
dpi
( allow_None=True, bounds=None, constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - The render resolution in dpi (dots per inch)
-
param ObjectSelector
fig
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=auto, instantiate=False, names=None, objects=[‘auto’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Output render format for static figures. If None, no figure rendering will occur.
-
param Number
fps
( allow_None=False, bounds=None, constant=False, default=20, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Rendered fps (frames per second) for animated formats.
-
param ObjectSelector
holomap
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=auto, instantiate=False, names=None, objects=[‘scrubber’, ‘widgets’, None, ‘auto’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Output render multi-frame (typically animated) format. If None, no multi-frame rendering will occur.
-
param ObjectSelector
mode
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=default, instantiate=False, names=None, objects=[‘default’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The available rendering modes. As a minimum, the ‘default’ mode must be supported.
-
param Integer
size
( allow_None=False, bounds=None, constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - The rendered size as a percentage size
-
param ObjectSelector
widget_mode
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=embed, instantiate=False, names=None, objects=[‘embed’, ‘live’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The widget mode determining whether frames are embedded or generated ‘live’ when interacting with the widget.
-
param Dict
css
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Dictionary of CSS attributes and values to apply to HTML output
-
param Dict
post_render_hooks
( allow_None=False, constant=False, default={‘svg’: [], ‘png’: []}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Optional dictionary of hooks that are applied to the rendered data (according to the output format) before it is returned. Each hook is passed the rendered data and the object that is being rendered. These hooks allow post-processing of rendered data before output is saved to file or displayed.
-
comm_manager
¶ -
alias of
pyviz_comms.CommManager
-
components
( obj , fmt=None , comm=True , **kwargs ) [source] ¶ -
Returns data and metadata dictionaries containing HTML and JS components to include render in app, notebook, or standalone document. Depending on the backend the fmt defines the format embedded in the HTML, e.g. png or svg. If comm is enabled the JS code will set up a Websocket comm channel using the currently defined CommManager.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
encode
( entry ) ¶ -
Classmethod that applies conditional encoding based on mime-type. Given an entry as returned by __call__ return the data in the appropriate encoding.
-
export_widgets
= functools.partial(<function Renderer.export_widgets>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
get_plot
= functools.partial(<function Renderer.get_plot>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
get_size
= functools.partial(<function Renderer.get_size>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
html
( obj , fmt=None , css=None , **kwargs ) [source] ¶ -
Renders plot or data structure and wraps the output in HTML. The comm argument defines whether the HTML output includes code to initialize a Comm, if the plot supplies one.
-
classmethod
html_assets
( core=True , extras=True , backends=None , script=False ) [source] ¶ -
Returns JS and CSS and for embedding of widgets.
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
instance
= functools.partial(<function ParameterizedFunction.instance>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
classmethod
load_nb
( inline=True ) [source] ¶ -
Loads any resources required for display of plots in the Jupyter notebook
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
classmethod
plot_options
( obj , percent_size ) [source] ¶ -
Given an object and a percentage size (as supplied by the %output magic) return all the appropriate plot options that would be used to instantiate a plot class for that element.
Default plot sizes at the plotting class level should be taken into account.
-
classmethod
plotting_class
( obj ) [source] ¶ -
Given an object or Element class, return the suitable plotting class needed to render it with the current renderer.
-
pprint
( imports=None , prefix='\n ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
save
= functools.partial(<function Renderer.save>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
classmethod
state
( ) [source] ¶ -
Context manager to handle global state for a backend, allowing Plot classes to temporarily override that state.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
static_html
( obj , fmt=None , template=None ) [source] ¶ -
Generates a static HTML with the rendered object in the supplied format. Allows supplying a template formatting string with fields to interpolate ‘js’, ‘css’ and the main ‘html’.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Callable
comms
Module
¶
plot
Module
¶
Public API for all plots supported by HoloViews, regardless of plotting package or backend. Every plotting classes must be a subclass of this Plot baseclass.
-
class
holoviews.plotting.plot.
DimensionedPlot
( keys=None , dimensions=None , layout_dimensions=None , uniform=True , subplot=False , adjoined=None , layout_num=0 , style=None , subplots=None , dynamic=False , renderer=None , comm=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.plot.Plot
DimensionedPlot implements a number of useful methods to compute dimension ranges and titles containing the dimension values.
-
param Parameter
fontsize
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Specifies various font sizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys revert to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘zlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the font size of ‘zlabel’, ‘ylabel’ and ‘xlabel’ together using the ‘labels’ key.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to display the plot title.
-
param String
title
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param String
title_format
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Alias for title.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom, projection objects may be supplied.
-
cleanup
( ) ¶ -
Cleans up references to the plot on the attached Stream subscribers.
-
compute_ranges
( obj , key , ranges ) [source] ¶ -
Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
refresh
( **kwargs ) [source] ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
traverse
( fn=None , specs=None , full_breadth=True ) [source] ¶ -
Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Parameter
-
class
holoviews.plotting.plot.
GenericElementPlot
( element , keys=None , ranges=None , dimensions=None , batched=False , overlaid=0 , cyclic_index=0 , zorder=0 , style=None , overlay_dims={} , stream_sources=[] , streams=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.plot.DimensionedPlot
Plotting baseclass to render contents of an Element. Implements methods to get the correct frame given a HoloMap, axis labels and extents and titles.
-
param Parameter
fontsize
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Specifies various font sizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys revert to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘zlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the font size of ‘zlabel’, ‘ylabel’ and ‘xlabel’ together using the ‘labels’ key.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to display the plot title.
-
param String
title
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param String
title_format
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Alias for title.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom, projection objects may be supplied.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to compute the plot bounds from the data itself.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to apply extent overrides on the Elements
-
param ClassSelector
bgcolor
( allow_None=True, constant=False, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - If set bgcolor overrides the background color of the axis.
-
param ClassSelector
default_span
( allow_None=False, constant=False, default=2.0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Defines the span of an axis if the axis range is zero, i.e. if the lower and upper end of an axis are equal or no range is defined at all. For example if there is a single datapoint at 0 a default_span of 2.0 will result in axis ranges spanning from -1 to 1.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to invert the x- and y-axis
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to invert the plot x-axis.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to invert the plot y-axis.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether the x-axis of the plot will be a log axis.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether the y-axis of the plot will be a log axis.
-
param ClassSelector
padding
( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - 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.
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to show legend for the plot.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to show a Cartesian grid on the plot.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=bottom, instantiate=False, names=None, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None, True, False], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether and where to display the xaxis. The “bare” options allow suppressing all axis labels, including ticks and xlabel. Valid options are ‘top’, ‘bottom’, ‘bare’, ‘top-bare’ and ‘bottom-bare’.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=left, instantiate=False, names=None, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None, True, False], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether and where to display the yaxis. The “bare” options allow suppressing all axis labels, including ticks and ylabel. Valid options are ‘left’, ‘right’, ‘bare’, ‘left-bare’ and ‘right-bare’.
-
param String
xlabel
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - An explicit override of the x-axis label, if set takes precedence over the dimension label.
-
param String
ylabel
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - An explicit override of the y-axis label, if set takes precedence over the dimension label.
-
param NumericTuple
xlim
( allow_None=False, constant=False, default=(nan, nan), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - User-specified x-axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.
-
param NumericTuple
ylim
( allow_None=False, constant=False, default=(nan, nan), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - User-specified x-axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.
-
param NumericTuple
zlim
( allow_None=False, constant=False, default=(nan, nan), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - User-specified z-axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Rotation angle of the xticks.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Rotation angle of the yticks.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Ticks along x-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Ticks along y-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.
-
cleanup
( ) ¶ -
Cleans up references to the plot on the attached Stream subscribers.
-
compute_ranges
( obj , key , ranges ) ¶ -
Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
get_extents
( element , ranges , range_type='combined' , xdim=None , ydim=None , zdim=None ) [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.
-
get_padding
( extents ) [source] ¶ -
Computes padding along the axes taking into account the plot aspect.
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
get_zorder
( overlay , key , el ) [source] ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.
-
update_frame
( key , ranges=None ) [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.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Parameter
-
class
holoviews.plotting.plot.
GenericLayoutPlot
( layout , **params ) [source] ¶ -
Bases:
holoviews.plotting.plot.GenericCompositePlot
A GenericLayoutPlot accepts either a Layout or a NdLayout and displays the elements in a cartesian grid in scanline order.
-
param Parameter
fontsize
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Specifies various font sizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys revert to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘zlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the font size of ‘zlabel’, ‘ylabel’ and ‘xlabel’ together using the ‘labels’ key.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to display the plot title.
-
param String
title
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param String
title_format
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Alias for title.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom, projection objects may be supplied.
-
param Boolean
transpose
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to transpose the layout when plotting. Switches from row-based left-to-right and top-to-bottom scanline order to column-based top-to-bottom and left-to-right order.
-
cleanup
( ) ¶ -
Cleans up references to the plot on the attached Stream subscribers.
-
compute_ranges
( obj , key , ranges ) ¶ -
Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Parameter
-
class
holoviews.plotting.plot.
GenericOverlayPlot
( overlay , ranges=None , batched=True , keys=None , group_counter=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.plot.GenericElementPlot
Plotting baseclass to render (Nd)Overlay objects. It implements methods to handle the creation of ElementPlots, coordinating style groupings and zorder for all layers across a HoloMap. It also allows collapsing of layers via the Compositor.
-
param Parameter
fontsize
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Specifies various font sizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys revert to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘zlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the font size of ‘zlabel’, ‘ylabel’ and ‘xlabel’ together using the ‘labels’ key.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to display the plot title.
-
param String
title
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param String
title_format
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Alias for title.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom, projection objects may be supplied.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to compute the plot bounds from the data itself.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to apply extent overrides on the Elements
-
param ClassSelector
bgcolor
( allow_None=True, constant=False, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - If set bgcolor overrides the background color of the axis.
-
param ClassSelector
default_span
( allow_None=False, constant=False, default=2.0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Defines the span of an axis if the axis range is zero, i.e. if the lower and upper end of an axis are equal or no range is defined at all. For example if there is a single datapoint at 0 a default_span of 2.0 will result in axis ranges spanning from -1 to 1.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to invert the x- and y-axis
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to invert the plot x-axis.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to invert the plot y-axis.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether the x-axis of the plot will be a log axis.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether the y-axis of the plot will be a log axis.
-
param ClassSelector
padding
( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - 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.
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to show legend for the plot.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to show a Cartesian grid on the plot.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=bottom, instantiate=False, names=None, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None, True, False], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether and where to display the xaxis. The “bare” options allow suppressing all axis labels, including ticks and xlabel. Valid options are ‘top’, ‘bottom’, ‘bare’, ‘top-bare’ and ‘bottom-bare’.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=left, instantiate=False, names=None, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None, True, False], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether and where to display the yaxis. The “bare” options allow suppressing all axis labels, including ticks and ylabel. Valid options are ‘left’, ‘right’, ‘bare’, ‘left-bare’ and ‘right-bare’.
-
param String
xlabel
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - An explicit override of the x-axis label, if set takes precedence over the dimension label.
-
param String
ylabel
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - An explicit override of the y-axis label, if set takes precedence over the dimension label.
-
param NumericTuple
xlim
( allow_None=False, constant=False, default=(nan, nan), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - User-specified x-axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.
-
param NumericTuple
ylim
( allow_None=False, constant=False, default=(nan, nan), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - User-specified x-axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.
-
param NumericTuple
zlim
( allow_None=False, constant=False, default=(nan, nan), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - User-specified z-axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Rotation angle of the xticks.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Rotation angle of the yticks.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Ticks along x-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Ticks along y-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.
-
param Boolean
batched
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to plot Elements NdOverlay in a batched plotting call if possible. Disables legends and zorder may not be preserved.
-
param Integer
legend_limit
( allow_None=False, bounds=None, constant=False, default=25, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Number of rendered glyphs before legends are disabled.
-
param Integer
style_grouping
( allow_None=False, bounds=None, constant=False, default=2, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - The length of the type.group.label spec that will be used to group Elements into style groups. A style_grouping value of 1 will group just by type, a value of 2 will group by type and group, and a value of 3 will group by the full specification.
-
cleanup
( ) ¶ -
Cleans up references to the plot on the attached Stream subscribers.
-
compute_ranges
( obj , key , ranges ) ¶ -
Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
get_aspect
( xspan , yspan ) ¶ -
Should define the aspect ratio of the plot.
-
get_padding
( extents ) ¶ -
Computes padding along the axes taking into account the plot aspect.
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
get_zorder
( overlay , key , el ) ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.
-
update_frame
( key , ranges=None ) ¶ -
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.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Parameter
-
class
holoviews.plotting.plot.
Plot
( **params ) [source] ¶ -
Bases:
param.parameterized.Parameterized
Base class of all Plot classes in HoloViews, designed to be general enough to use any plotting package or backend.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
update
( key ) [source] ¶ -
Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
renderer
Module
¶
Public API for all plotting renderers supported by HoloViews, regardless of plotting package or backend.
-
class
holoviews.plotting.renderer.
Renderer
( **params ) [source] ¶ -
Bases:
holoviews.core.io.Exporter
The job of a Renderer is to turn the plotting state held within Plot classes into concrete, visual output in the form of the PNG, SVG, MP4 or WebM formats (among others). Note that a Renderer is a type of Exporter and must therefore follow the Exporter interface.
The Renderer needs to be able to use the .state property of the appropriate Plot classes associated with that renderer in order to generate output. The process of ‘drawing’ is execute by the Plots and the Renderer turns the final plotting state into output.
-
param Callable
key_fn
( allow_None=True, constant=True, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Renderers do not support the saving of object key metadata
-
param Callable
info_fn
( allow_None=True, constant=True, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Renderers do not support the saving of object info metadata
-
param String
backend
( allow_None=False, basestring=<class ‘str’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The full, lowercase name of the rendering backend or third part plotting package used e.g ‘matplotlib’ or ‘cairo’.
-
param Integer
dpi
( allow_None=True, bounds=None, constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - The render resolution in dpi (dots per inch)
-
param ObjectSelector
fig
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=auto, instantiate=False, names=None, objects=[‘auto’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Output render format for static figures. If None, no figure rendering will occur.
-
param Number
fps
( allow_None=False, bounds=None, constant=False, default=20, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - Rendered fps (frames per second) for animated formats.
-
param ObjectSelector
holomap
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=auto, instantiate=False, names=None, objects=[‘scrubber’, ‘widgets’, None, ‘auto’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Output render multi-frame (typically animated) format. If None, no multi-frame rendering will occur.
-
param ObjectSelector
mode
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=default, instantiate=False, names=None, objects=[‘default’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The available rendering modes. As a minimum, the ‘default’ mode must be supported.
-
param Integer
size
( allow_None=False, bounds=None, constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} ) - The rendered size as a percentage size
-
param ObjectSelector
widget_mode
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=embed, instantiate=False, names=None, objects=[‘embed’, ‘live’], pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The widget mode determining whether frames are embedded or generated ‘live’ when interacting with the widget.
-
param Dict
css
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Dictionary of CSS attributes and values to apply to HTML output
-
param Dict
post_render_hooks
( allow_None=False, constant=False, default={‘svg’: [], ‘png’: []}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Optional dictionary of hooks that are applied to the rendered data (according to the output format) before it is returned. Each hook is passed the rendered data and the object that is being rendered. These hooks allow post-processing of rendered data before output is saved to file or displayed.
-
comm_manager
¶ -
alias of
pyviz_comms.CommManager
-
components
( obj , fmt=None , comm=True , **kwargs ) [source] ¶ -
Returns data and metadata dictionaries containing HTML and JS components to include render in app, notebook, or standalone document. Depending on the backend the fmt defines the format embedded in the HTML, e.g. png or svg. If comm is enabled the JS code will set up a Websocket comm channel using the currently defined CommManager.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
encode
( entry ) ¶ -
Classmethod that applies conditional encoding based on mime-type. Given an entry as returned by __call__ return the data in the appropriate encoding.
-
export_widgets
= functools.partial(<function Renderer.export_widgets>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
get_plot
= functools.partial(<function Renderer.get_plot>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
get_size
= functools.partial(<function Renderer.get_size>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
html
( obj , fmt=None , css=None , **kwargs ) [source] ¶ -
Renders plot or data structure and wraps the output in HTML. The comm argument defines whether the HTML output includes code to initialize a Comm, if the plot supplies one.
-
classmethod
html_assets
( core=True , extras=True , backends=None , script=False ) [source] ¶ -
Returns JS and CSS and for embedding of widgets.
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
instance
= functools.partial(<function ParameterizedFunction.instance>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
classmethod
load_nb
( inline=True ) [source] ¶ -
Loads any resources required for display of plots in the Jupyter notebook
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
classmethod
plot_options
( obj , percent_size ) [source] ¶ -
Given an object and a percentage size (as supplied by the %output magic) return all the appropriate plot options that would be used to instantiate a plot class for that element.
Default plot sizes at the plotting class level should be taken into account.
-
classmethod
plotting_class
( obj ) [source] ¶ -
Given an object or Element class, return the suitable plotting class needed to render it with the current renderer.
-
pprint
( imports=None , prefix='\n ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y
-
print_param_defaults
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
save
= functools.partial(<function Renderer.save>, <class 'holoviews.plotting.renderer.Renderer'>) [source] ¶
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
classmethod
state
( ) [source] ¶ -
Context manager to handle global state for a backend, allowing Plot classes to temporarily override that state.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
static_html
( obj , fmt=None , template=None ) [source] ¶ -
Generates a static HTML with the rendered object in the supplied format. Allows supplying a template formatting string with fields to interpolate ‘js’, ‘css’ and the main ‘html’.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Callable
util
Module
¶
-
class
holoviews.plotting.util.
CMapInfo
( name , provider , category , source , bg ) ¶ -
Bases:
tuple
-
bg
¶ -
Alias for field number 4
-
category
¶ -
Alias for field number 2
-
count
( value ) → integer -- return number of occurrences of value ¶
-
index
( value [ , start [ , stop ] ] ) → integer -- return first index of value. ¶ -
Raises ValueError if the value is not present.
-
name
¶ -
Alias for field number 0
-
provider
¶ -
Alias for field number 1
-
source
¶ -
Alias for field number 3
-
-
holoviews.plotting.util.
attach_streams
( plot , obj , precedence=1.1 ) [source] ¶ -
Attaches plot refresh to all streams on the object.
-
holoviews.plotting.util.
color_intervals
( colors , levels , clip=None , N=255 ) [source] ¶ -
Maps the supplied colors into bins defined by the supplied levels. If a clip tuple is defined the bins are clipped to the defined range otherwise the range is computed from the levels and returned.
- colors: list
- List of colors (usually hex string or named colors)
- levels: list or array_like
- Levels specifying the bins to map the colors to
- clip: tuple (optional)
- Lower and upper limits of the color range
- N: int
- Number of discrete colors to map the range onto
- cmap: list
- List of colors
- clip: tuple
- Lower and upper bounds of the color range
-
holoviews.plotting.util.
compute_overlayable_zorders
( obj , path=[] ) [source] ¶ -
Traverses an overlayable composite container to determine which objects are associated with specific (Nd)Overlay layers by z-order, making sure to take DynamicMap Callables into account. Returns a mapping between the zorders of each layer and a corresponding lists of objects.
Used to determine which overlaid subplots should be linked with Stream callbacks.
-
holoviews.plotting.util.
compute_sizes
( sizes , size_fn , scaling_factor , scaling_method , base_size ) [source] ¶ -
Scales point sizes according to a scaling factor, base size and size_fn, which will be applied before scaling.
-
holoviews.plotting.util.
dim_axis_label
( dimensions , separator=' , ' ) [source] ¶ -
Returns an axis label for one or more dimensions.
-
holoviews.plotting.util.
dim_range_key
( eldim ) [source] ¶ -
Returns the key to look up a dimension range.
-
holoviews.plotting.util.
displayable
( obj ) [source] ¶ -
Predicate that returns whether the object is displayable or not (i.e whether the object obeys the nesting hierarchy
-
holoviews.plotting.util.
dynamic_update
( plot , subplot , key , overlay , items ) [source] ¶ -
Given a plot, subplot and dynamically generated (Nd)Overlay find the closest matching Element for that plot.
-
holoviews.plotting.util.
get_axis_padding
( padding ) [source] ¶ -
Process a padding value supplied as a tuple or number and returns padding values for x-, y- and z-axis.
-
holoviews.plotting.util.
get_directed_graph_paths
( element , arrow_length ) [source] ¶ -
Computes paths for a directed path which include an arrow to indicate the directionality of each edge.
-
holoviews.plotting.util.
get_dynamic_mode
( composite ) [source] ¶ -
Returns the common mode of the dynamic maps in given composite object
-
holoviews.plotting.util.
get_min_distance
( element ) [source] ¶ -
Gets the minimum sampling distance of the x- and y-coordinates in a grid.
-
holoviews.plotting.util.
get_minimum_span
( low , high , span ) [source] ¶ -
If lower and high values are equal ensures they are separated by the defined span.
-
holoviews.plotting.util.
get_nested_plot_frame
( obj , key_map , cached=False ) [source] ¶ -
Extracts a single frame from a nested object.
Replaces any HoloMap or DynamicMap in the nested data structure, with the item corresponding to the supplied key.
- Args:
- obj: Nested Dimensioned object key_map: Dictionary mapping between dimensions and key value cached: Whether to allow looking up key in cache
- Returns:
- Nested datastructure where maps are replaced with single frames
-
holoviews.plotting.util.
get_plot_frame
( map_obj , key_map , cached=False ) [source] ¶ -
Returns the current frame in a mapping given a key mapping.
- Args:
- obj: Nested Dimensioned object key_map: Dictionary mapping between dimensions and key value cached: Whether to allow looking up key in cache
- Returns:
- The item in the mapping corresponding to the supplied key.
-
holoviews.plotting.util.
get_range
( element , ranges , dimension ) [source] ¶ -
Computes the data, soft- and hard-range along a dimension given an element and a dictionary of ranges.
-
holoviews.plotting.util.
get_sideplot_ranges
( plot , element , main , ranges ) [source] ¶ -
Utility to find the range for an adjoined plot given the plot, the element, the Element the plot is adjoined to and the dictionary of ranges.
-
holoviews.plotting.util.
initialize_dynamic
( obj ) [source] ¶ -
Initializes all DynamicMap objects contained by the object
-
holoviews.plotting.util.
initialize_unbounded
( obj , dimensions , key ) [source] ¶ -
Initializes any DynamicMaps in unbounded mode.
-
holoviews.plotting.util.
is_dynamic_overlay
( dmap ) [source] ¶ -
Traverses a DynamicMap graph and determines if any components were overlaid dynamically (i.e. by * on a DynamicMap).
-
holoviews.plotting.util.
isoverlay_fn
( obj ) [source] ¶ -
Determines whether object is a DynamicMap returning (Nd)Overlay types.
-
holoviews.plotting.util.
linear_gradient
( start_hex , finish_hex , n=10 ) [source] ¶ -
Interpolates the color gradient between to hex colors
-
holoviews.plotting.util.
list_cmaps
( provider=None , records=False , name=None , category=None , source=None , bg=None , reverse=None ) [source] ¶ -
Return colormap names matching the specified filters.
-
holoviews.plotting.util.
map_colors
( arr , crange , cmap , hex=True ) [source] ¶ -
Maps an array of values to RGB hex strings, given a color range and colormap.
-
holoviews.plotting.util.
mplcmap_to_palette
( cmap , ncolors=None , categorical=False ) [source] ¶ -
Converts a matplotlib colormap to palette of RGB hex strings.”
-
holoviews.plotting.util.
overlay_depth
( obj ) [source] ¶ -
Computes the depth of a DynamicMap overlay if it can be determined otherwise return None.
-
holoviews.plotting.util.
polylinear_gradient
( colors , n ) [source] ¶ -
Interpolates the color gradients between a list of hex colors.
-
holoviews.plotting.util.
process_cmap
( cmap , ncolors=None , provider=None , categorical=False ) [source] ¶ -
Convert valid colormap specifications to a list of colors.
-
holoviews.plotting.util.
register_cmaps
( category , provider , source , bg , names ) [source] ¶ -
Maintain descriptions of colormaps that include the following information:
name - string name for the colormap category - intended use or purpose, mostly following matplotlib provider - package providing the colormap directly source - original source or creator of the colormaps bg - base/background color expected for the map
(‘light’,’dark’,’medium’,’any’ (unknown or N/A))
-
holoviews.plotting.util.
save_frames
( obj , filename , fmt=None , backend=None , options=None ) [source] ¶ -
Utility to export object to files frame by frame, numbered individually. Will use default backend and figure format by default.
-
holoviews.plotting.util.
split_dmap_overlay
( obj , depth=0 ) [source] ¶ -
Splits a DynamicMap into the original component layers it was constructed from by traversing the graph to search for dynamically overlaid components (i.e. constructed by using * on a DynamicMap). Useful for assigning subplots of an OverlayPlot the streams that are responsible for driving their updates. Allows the OverlayPlot to determine if a stream update should redraw a particular subplot.
-
holoviews.plotting.util.
traverse_setter
( obj , attribute , value ) [source] ¶ -
Traverses the object and sets the supplied attribute on the object. Supports Dimensioned and DimensionedPlot types.