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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
-
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=False, basestring=<class ‘str’>, constant=False, default=default_colors, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - The values the cycle will iterate over.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.core.options.Cycle'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.core.options.Cycle'>) ¶
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.core.options.Cycle'>) ¶
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.core.options.Cycle'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
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 ) - 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 ) - 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 ) - 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> ) - 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, objects=[‘auto’], pickle_default_value=True, precedence=None, readonly=False ) - 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> ) - 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, objects=[‘scrubber’, ‘widgets’, None, ‘auto’], pickle_default_value=True, precedence=None, readonly=False ) - 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, objects=[‘default’], pickle_default_value=True, precedence=None, readonly=False ) - 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> ) - 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, objects=[‘embed’, ‘live’], pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - 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 ) - 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.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
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 Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
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 Parameterized.get_value_generator>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
html
( obj , fmt=None , css=None , comm=True , **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 ) [source] ¶ -
Returns JS and CSS and for embedding of widgets.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
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
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Callable
comms
Module
¶
-
class
holoviews.plotting.comms.
Comm
( plot , id=None , on_msg=None ) [source] ¶ -
Bases:
object
Comm encompasses any uni- or bi-directional connection between a python process and a frontend allowing passing of messages between the two. A Comms class must implement methods send data and handle received message events.
If the Comm has to be set up on the frontend a template to handle the creation of the comms channel along with a message handler to process incoming messages must be supplied.
The template must accept three arguments:
- id - A unique id to register to register the comm under.
-
- msg_handler - JS code which has the msg variable in scope and
- performs appropriate action for the supplied message.
- init_frame - The initial frame to render on the frontend.
-
class
holoviews.plotting.comms.
JupyterComm
( plot , id=None , on_msg=None ) [source] ¶ -
Bases:
holoviews.plotting.comms.Comm
JupyterComm provides a Comm for the notebook which is initialized the first time data is pushed to the frontend.
-
class
holoviews.plotting.comms.
JupyterCommJS
( plot , id=None , on_msg=None ) [source] ¶ -
Bases:
holoviews.plotting.comms.JupyterComm
JupyterCommJS provides a comms channel for the Jupyter notebook, which is initialized on the frontend. This allows sending events initiated on the frontend to python.
-
decode
( msg ) ¶ -
Decodes messages following Jupyter messaging protocol. If JSON decoding fails data is assumed to be a regular string.
-
-
class
holoviews.plotting.comms.
StandardOutput
[source] ¶ -
Bases:
list
Context manager to capture standard output for any code it is wrapping and make it available as a list, e.g.:
>>> with StandardOutput() as stdout: ... print('This gets captured') >>> print(stdout[0]) This gets captured
-
append
( object ) → None -- append object to end ¶
-
clear
( ) → None -- remove all items from L ¶
-
copy
( ) → list -- a shallow copy of L ¶
-
count
( value ) → integer -- return number of occurrences of value ¶
-
extend
( iterable ) → None -- extend list by appending elements from the iterable ¶
-
index
( value [ , start [ , stop ] ] ) → integer -- return first index of value. ¶ -
Raises ValueError if the value is not present.
-
insert
( ) ¶ -
L.insert(index, object) – insert object before index
-
pop
( [ index ] ) → item -- remove and return item at index (default last). ¶ -
Raises IndexError if list is empty or index is out of range.
-
remove
( value ) → None -- remove first occurrence of value. ¶ -
Raises ValueError if the value is not present.
-
reverse
( ) ¶ -
L.reverse() – reverse IN PLACE
-
sort
( key=None , reverse=False ) → None -- stable sort *IN PLACE* ¶
-
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 , **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 ) - Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the fontsize of both ‘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 ) - Whether to display the plot title.
-
param String
title_format
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - 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.
-
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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
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
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.plot.DimensionedPlot'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
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=[] , **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 ) - Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the fontsize of both ‘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 ) - Whether to display the plot title.
-
param String
title_format
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - 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 ) - 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 ) - Whether to apply extent overrides on the Elements
-
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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
get_extents
( view , ranges ) [source] ¶ -
Gets the extents for the axes from the current View. The globally computed ranges can optionally override the extents.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <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 Parameterized.inspect_value>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
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
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.plot.GenericElementPlot'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
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 ) - Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the fontsize of both ‘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 ) - Whether to display the plot title.
-
param String
title_format
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - 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 ) - 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.
-
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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <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 Parameterized.inspect_value>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
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
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.plot.GenericLayoutPlot'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Parameter
-
class
holoviews.plotting.plot.
GenericOverlayPlot
( overlay , ranges=None , batched=True , keys=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 ) - Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘ticks’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the fontsize of both ‘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 ) - Whether to display the plot title.
-
param String
title_format
( allow_None=False, basestring=<class ‘str’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - 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 ) - 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 ) - Whether to apply extent overrides on the Elements
-
param Boolean
batched
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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> ) - Number of rendered glyphs before legends are disabled.
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show legend for the plot.
-
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> ) - The length of the type.group.label spec that will be used to group Elements into style groups, i.e. 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.
-
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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <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 Parameterized.inspect_value>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
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
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.plot.GenericOverlayPlot'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.plot.Plot'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
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 ) - 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 ) - 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 ) - 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> ) - 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, objects=[‘auto’], pickle_default_value=True, precedence=None, readonly=False ) - 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> ) - 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, objects=[‘scrubber’, ‘widgets’, None, ‘auto’], pickle_default_value=True, precedence=None, readonly=False ) - 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, objects=[‘default’], pickle_default_value=True, precedence=None, readonly=False ) - 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> ) - 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, objects=[‘embed’, ‘live’], pickle_default_value=True, precedence=None, readonly=False ) - 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 ) - 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 ) - 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.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
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 Parameterized.force_new_dynamic_value>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
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 Parameterized.get_value_generator>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
html
( obj , fmt=None , css=None , comm=True , **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 ) [source] ¶ -
Returns JS and CSS and for embedding of widgets.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
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
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
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
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.plotting.renderer.Renderer'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <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
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Callable
util
Module
¶
-
holoviews.plotting.util.
attach_streams
( plot , obj , precedence=1.1 ) [source] ¶ -
Attaches plot refresh to all streams on the object.
-
holoviews.plotting.util.
closest_match
( match , specs , depth=0 ) [source] ¶ -
Recursively iterates over type, group, label and overlay key, finding the closest matching spec.
-
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.
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_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_plot_frame
( map_obj , key_map , cached=False ) [source] ¶ -
Returns an item in a HoloMap or DynamicMap given a mapping key dimensions and their values.
-
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.
isoverlay_fn
( obj ) [source] ¶ -
Determines whether object is a DynamicMap returning (Nd)Overlay types.
-
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.
overlay_depth
( obj ) [source] ¶ -
Computes the depth of a DynamicMap overlay if it can be determined otherwise return None.
-
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.
traverse_setter
( obj , attribute , value ) [source] ¶ -
Traverses the object and sets the supplied attribute on the object. Supports Dimensioned and DimensionedPlot types.