holoviews.ipython Package


ipython Package

Inheritance diagram of holoviews.ipython

class holoviews.ipython. IPTestCase ( *args , **kwargs ) [source]

Bases: holoviews.element.comparison.ComparisonTestCase

This class extends ComparisonTestCase to handle IPython specific objects and support the execution of cells and magic.

addCleanup ( function , *args , **kwargs )

Add a function, with arguments, to be called when the test is completed. Functions added are called on a LIFO basis and are called after tearDown on test failure or success.

Cleanup items are called even if setUp fails (unlike tearDown).

addTypeEqualityFunc ( typeobj , function )

Add a type specific assertEqual style function to compare a type.

This method is for use by TestCase subclasses that need to register their own type equality functions to provide nicer error messages.

Args:
typeobj: The data type to call this function on when both values
are of the same type in assertEqual().
function: The callable taking two arguments and an optional
msg= argument that raises self.failureException with a useful error message when the two arguments are not equal.
assertAlmostEqual ( first , second , places=None , msg=None , delta=None )

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most significant digit).

If the two objects compare equal then they will automatically compare almost equal.

assertAlmostEquals ( first , second , places=None , msg=None , delta=None )

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most significant digit).

If the two objects compare equal then they will automatically compare almost equal.

assertDictContainsSubset ( expected , actual , msg=None )

Checks whether actual is a superset of expected.

assertEqual ( first , second , msg=None )

Classmethod equivalent to unittest.TestCase method

assertEquals ( first , second , msg=None )

Fail if the two objects are unequal as determined by the ‘==’ operator.

assertFalse ( expr , msg=None )

Check that the expression is false.

assertGreater ( a , b , msg=None )

Just like self.assertTrue(a > b), but with a nicer default message.

assertGreaterEqual ( a , b , msg=None )

Just like self.assertTrue(a >= b), but with a nicer default message.

assertIn ( member , container , msg=None )

Just like self.assertTrue(a in b), but with a nicer default message.

assertIs ( expr1 , expr2 , msg=None )

Just like self.assertTrue(a is b), but with a nicer default message.

assertIsInstance ( obj , cls , msg=None )

Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.

assertIsNone ( obj , msg=None )

Same as self.assertTrue(obj is None), with a nicer default message.

assertIsNot ( expr1 , expr2 , msg=None )

Just like self.assertTrue(a is not b), but with a nicer default message.

assertIsNotNone ( obj , msg=None )

Included for symmetry with assertIsNone.

assertItemsEqual ( expected_seq , actual_seq , msg=None )

An unordered sequence specific comparison. It asserts that actual_seq and expected_seq have the same element counts. Equivalent to:

self.assertEqual(Counter(iter(actual_seq)),
                 Counter(iter(expected_seq)))

Asserts that each element has the same count in both sequences. Example:

  • [0, 1, 1] and [1, 0, 1] compare equal.
  • [0, 0, 1] and [0, 1] compare unequal.
assertLess ( a , b , msg=None )

Just like self.assertTrue(a < b), but with a nicer default message.

assertLessEqual ( a , b , msg=None )

Just like self.assertTrue(a <= b), but with a nicer default message.

assertListEqual ( list1 , list2 , msg=None )

A list-specific equality assertion.

Args:

list1: The first list to compare. list2: The second list to compare. msg: Optional message to use on failure instead of a list of

differences.
assertMultiLineEqual ( first , second , msg=None )

Assert that two multi-line strings are equal.

assertNotAlmostEqual ( first , second , places=None , msg=None , delta=None )

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most significant digit).

Objects that are equal automatically fail.

assertNotAlmostEquals ( first , second , places=None , msg=None , delta=None )

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most significant digit).

Objects that are equal automatically fail.

assertNotEqual ( first , second , msg=None )

Fail if the two objects are equal as determined by the ‘!=’ operator.

assertNotEquals ( first , second , msg=None )

Fail if the two objects are equal as determined by the ‘!=’ operator.

assertNotIn ( member , container , msg=None )

Just like self.assertTrue(a not in b), but with a nicer default message.

assertNotIsInstance ( obj , cls , msg=None )

Included for symmetry with assertIsInstance.

assertNotRegexpMatches ( text , unexpected_regexp , msg=None )

Fail the test if the text matches the regular expression.

assertRaises ( excClass , callableObj=None , *args , **kwargs )

Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.

If called with callableObj omitted or None, will return a context object used like this:

with self.assertRaises(SomeException):
    do_something()

The context manager keeps a reference to the exception as the ‘exception’ attribute. This allows you to inspect the exception after the assertion:

with self.assertRaises(SomeException) as cm:
    do_something()
the_exception = cm.exception
self.assertEqual(the_exception.error_code, 3)
assertRaisesRegexp ( expected_exception , expected_regexp , callable_obj=None , *args , **kwargs )

Asserts that the message in a raised exception matches a regexp.

Args:

expected_exception: Exception class expected to be raised. expected_regexp: Regexp (re pattern object or string) expected

to be found in error message.

callable_obj: Function to be called. args: Extra args. kwargs: Extra kwargs.

assertRegexpMatches ( text , expected_regexp , msg=None )

Fail the test unless the text matches the regular expression.

assertSequenceEqual ( seq1 , seq2 , msg=None , seq_type=None )

An equality assertion for ordered sequences (like lists and tuples).

For the purposes of this function, a valid ordered sequence type is one which can be indexed, has a length, and has an equality operator.

Args:

seq1: The first sequence to compare. seq2: The second sequence to compare. seq_type: The expected datatype of the sequences, or None if no

datatype should be enforced.
msg: Optional message to use on failure instead of a list of
differences.
assertSetEqual ( set1 , set2 , msg=None )

A set-specific equality assertion.

Args:

set1: The first set to compare. set2: The second set to compare. msg: Optional message to use on failure instead of a list of

differences.

assertSetEqual uses ducktyping to support different types of sets, and is optimized for sets specifically (parameters must support a difference method).

assertTrue ( expr , msg=None )

Check that the expression is true.

assertTupleEqual ( tuple1 , tuple2 , msg=None )

A tuple-specific equality assertion.

Args:

tuple1: The first tuple to compare. tuple2: The second tuple to compare. msg: Optional message to use on failure instead of a list of

differences.
assert_ ( expr , msg=None )

Check that the expression is true.

cell ( line ) [source]

Run an IPython cell

cell_magic ( *args , **kwargs ) [source]

Run an IPython cell magic

debug ( )

Run the test without collecting errors in a TestResult

doCleanups ( )

Execute all cleanup functions. Normally called for you after tearDown.

fail ( msg=None )

Fail immediately, with the given message.

failureException

alias of AssertionError

line_magic ( *args , **kwargs ) [source]

Run an IPython line magic

setUpClass ( )

Hook method for setting up class fixture before running tests in the class.

shortDescription ( )

Returns a one-line description of the test, or None if no description has been provided.

The default implementation of this method returns the first line of the specified test method’s docstring.

simple_equality ( first , second , msg=None )

Classmethod equivalent to unittest.TestCase method (longMessage = False.)

skipTest ( reason )

Skip this test.

tearDown ( )

Hook method for deconstructing the test fixture after testing it.

tearDownClass ( )

Hook method for deconstructing the class fixture after running all tests in the class.

holoviews.ipython. load_hvjs ( logo=False , JS=True , message='HoloViewsJS successfully loaded.' ) [source]

Displays javascript and CSS to initialize HoloViews widgets.

class holoviews.ipython. notebook_extension ( **params ) [source]

Bases: param.parameterized.ParameterizedFunction

params(holoviews=Boolean, display_formats=List, name=String, ip=Parameter, width=Number, inline=Boolean, logo=Boolean, css=String)

param List display_formats ( allow_None=False, bounds=(0, None), constant=False, default=[‘html’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A list of formats that are rendered to the notebook where multiple formats may be selected at once (although only one format will be displayed). Although the ‘html’ format is supported across backends, other formats supported by the current backend (e.g ‘png’ and ‘svg’ using the matplotlib backend) may be used. This may be useful to export figures to other formats such as PDF with nbconvert.
param Parameter ip ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
IPython kernel instance
param Number width ( allow_None=True, bounds=(0, 100), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
Width of the notebook as a percentage of the browser screen window width.
param Boolean inline ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether to inline JS and CSS resources, if disabled resources are loaded from CDN if one is available.
param Boolean logo ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Toggles display of HoloViews logo
param String css ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Optional CSS rule set to apply to the notebook.
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 object>
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 object>
inspect_value = <functools.partial object>
instance = <functools.partial object>
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='\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.

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 object>
set_param = <functools.partial object>
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.

tab_completion_docstring = <functools.partial object> [source]
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.

holoviews.ipython. show_traceback ( ) [source]

Display the full traceback after an abbreviated traceback has occured.


archive Module

Inheritance diagram of holoviews.ipython.archive

Implements NotebookArchive used to automatically capture notebook data and export it to disk via the display hooks.

class holoviews.ipython.archive. NotebookArchive ( **params ) [source]

Bases: holoviews.core.io.FileArchive

FileArchive that can automatically capture notebook data via the display hooks and automatically adds a notebook HTML snapshot to the archive upon export.

param Boolean unique_name ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether the export name should be made unique with a numeric suffix. If set to False, any existing export of the same name will be removed and replaced.
param Boolean skip_notebook_export ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether to skip JavaScript capture of notebook data which may be unreliable. Also disabled automatic capture of notebook name.
param Integer max_filename ( allow_None=False, bounds=(0, None), constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
Maximum length to enforce on generated filenames. 100 is the practical maximum for zip and tar file generation, but you may wish to use a lower value to avoid long filenames.
param String root ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=., instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The root directory in which the output directory is located. May be an absolute or relative path.
param String filename_formatter ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={dimensions},{obj}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Similar to FileArchive.filename_formatter except with support for the notebook name field as {notebook}.
param String export_name ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={notebook}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Similar to FileArchive.filename_formatter except with support for the notebook name field as {notebook}.
param String snapshot_name ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=index, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The basename of the exported notebook snapshot (html). It may optionally use the {timestamp} formatter.
param String dimension_formatter ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={name}_{range}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
A string formatter for the output file based on the supplied HoloViews objects dimension names and values. Valid fields are the {name}, {range} and {unit} of the dimensions.
param ObjectSelector archive_format ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=zip, instantiate=False, objects=[‘zip’, ‘tar’], pickle_default_value=True, precedence=None, readonly=False )
The archive format to use if there are multiple files and pack is set to True. Supported formats include ‘zip’ and ‘tar’.
param List exporters ( allow_None=False, bounds=(0, None), constant=False, default=[<class ‘holoviews.core.io.Pickler’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The exporter functions used to convert HoloViews objects into the appropriate format(s).
param Boolean flush_archive ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Flushed the contents of the archive after export.
param Callable object_formatter ( allow_None=False, constant=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Callable that given an object returns a string suitable for inclusion in file and directory names. This is what generates the value used in the {obj} field of the filename formatter.
param String timestamp_format ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=%Y_%m_%d-%H_%M_%S, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The timestamp format that will be substituted for the {timestamp} field in the export name.
param Boolean pack ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether or not to pack to contents into the specified archive format. If pack is False, the contents will be output to a directory. Note that if there is only a single file in the archive, no packing will occur and no directory is created. Instead, the file is treated as a single-file archive.
add ( obj=None , filename=None , data=None , info={} , html=None ) [source]

Similar to FileArchive.add but accepts html strings for substitution

auto ( enabled=Boolean , unique_name=Boolean , skip_notebook_export=Boolean , name=String , max_filename=Integer , root=String , filename_formatter=String , export_name=String , snapshot_name=String , dimension_formatter=String , archive_format=ObjectSelector , exporters=List , flush_archive=Boolean , object_formatter=Callable , timestamp_format=String , pack=Boolean ) [source]
contents ( maxlen=70 )

Print the current (unexported) contents of the archive

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.

export ( timestamp=None ) [source]

Get the current notebook data and export.

force_new_dynamic_value = <functools.partial object>
get_namespace ( ) [source]

Find the name the user is using to access holoviews.

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 object>
inspect_value = <functools.partial object>
last_export_status ( ) [source]

Helper to show the status of the last call to the export method.

listing ( )

Return a list of filename entries currently in the archive

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

object_formatter ( obj )

Simple name_generator designed for HoloViews objects.

Objects are labeled with {group}-{label} for each nested object, based on a depth-first search. Adjacent objects with identical representations yield only a single copy of the representation, to avoid long names for the common case of a container whose element(s) share the same group and label.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

parse_fields ( formatter )

Returns the format fields otherwise raise exception

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 object>
set_param = <functools.partial object>
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.

class holoviews.ipython.archive. Substitute ( version , substitutions , **kw ) [source]

Bases: nbconvert.preprocessors.base.Preprocessor

An nbconvert preprocessor that substitutes one set of HTML data output for another, adding annotation to the output as required.

The constructor accepts the notebook format version and a substitutions dictionary:

{source_html:(target_html, annotation)}

Where the annotation may be None (i.e. no annotation).

add_traits ( **traits )

Dynamically add trait attributes to the HasTraits instance.

class_config_rst_doc ( )

Generate rST documentation for this class’ config options.

Excludes traits defined on parent classes.

class_config_section ( )

Get the config class config section

class_get_help ( inst=None )

Get the help string for this class in ReST format.

If inst is given, it’s current trait values will be used in place of class defaults.

class_get_trait_help ( trait , inst=None )

Get the help string for a single trait.

If inst is given, it’s current trait values will be used in place of the class default.

class_own_traits ( **metadata )

Get a dict of all the traitlets defined on this class, not a parent.

Works like class_traits , except for excluding traits from parents.

class_print_help ( inst=None )

Get the help string for a single trait and print it.

class_trait_names ( **metadata )

Get a list of all the names of this class’ traits.

This method is just like the trait_names() method, but is unbound.

class_traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

This method is just like the traits() method, but is unbound.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

has_trait ( name )

Returns True if the object has a trait with the specified name.

hold_trait_notifications ( *args , **kwds )

Context manager for bundling trait change notifications and cross validation.

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

observe ( handler , names=traitlets.All , type='change' )

Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

handler : callable
A callable that is called when a trait changes. Its signature can be handler() or handler(change) , where change is a dictionary. The change dictionary at least holds a ‘type’ key. * type : the type of notification. Other keys may be passed depending on the value of ‘type’. In the case where type is ‘change’, we also have the following keys: * owner : the HasTraits instance * old : the old value of the modified trait attribute * new : the new value of the modified trait attribute * name : the name of the modified trait attribute.
names : list, str, All
If names is All, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
type : str, All (default: ‘change’)
The type of notification to filter by. If equal to All, then all notifications are passed to the observe handler.
on_trait_change ( handler=None , name=None , remove=False )

DEPRECATED: Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).

If remove is True and handler is not specified, all change handlers for the specified name are uninstalled.

handler : callable, None
A callable that is called when a trait changes. Its signature can be handler(), handler(name), handler(name, new), handler(name, old, new), or handler(name, old, new, self).
name : list, str, None
If None, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
remove : bool
If False (the default), then install the handler. If True then unintall it.
preprocess ( nb , resources )

Preprocessing to apply on each notebook.

Must return modified nb, resources.

If you wish to apply your preprocessing to each cell, you might want to override preprocess_cell method instead.

nb : NotebookNode
Notebook being converted
resources : dictionary
Additional resources used in the conversion process. Allows preprocessors to pass variables into the Jinja engine.
replace ( src ) [source]

Given some source html substitute and annotated as applicable

section_names ( )

return section names as a list

set_trait ( name , value )

Forcibly sets trait attribute, including read-only attributes.

trait_metadata ( traitname , key , default=None )

Get metadata values for trait by key.

trait_names ( **metadata )

Get a list of all the names of this class’ traits.

traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

unobserve ( handler , names=traitlets.All , type='change' )

Remove a trait change handler.

This is used to unregister handlers to trait change notificiations.

handler : callable
The callable called when a trait attribute changes.
names : list, str, All (default: All)
The names of the traits for which the specified handler should be uninstalled. If names is All, the specified handler is uninstalled from the list of notifiers corresponding to all changes.
type : str or All (default: ‘change’)
The type of notification to filter by. If All, the specified handler is uninstalled from the list of notifiers corresponding to all types.
unobserve_all ( name=traitlets.All )

Remove trait change handlers of any type for the specified name. If name is not specified, removes all trait notifiers.

update_config ( config )

Update config and trigger reload of config via trait events


display_hooks Module

Definition and registration of display hooks for the IPython Notebook.

holoviews.ipython.display_hooks. display ( obj , raw=False , **kwargs ) [source]

Renders any HoloViews object to HTML and displays it using the IPython display function. If raw is enabled the raw HTML is returned instead of displaying it directly.

holoviews.ipython.display_hooks. element_png_display ( element ) [source]

Used to render elements to PNG if requested in the display formats.

holoviews.ipython.display_hooks. element_svg_display ( element ) [source]

Used to render elements to SVG if requested in the display formats.

holoviews.ipython.display_hooks. first_frame ( obj ) [source]

Only display the first frame of an animated plot

holoviews.ipython.display_hooks. last_frame ( obj ) [source]

Only display the last frame of an animated plot

holoviews.ipython.display_hooks. middle_frame ( obj ) [source]

Only display the (approximately) middle frame of an animated plot

holoviews.ipython.display_hooks. process_object ( obj ) [source]

Hook to process the object currently being displayed.

holoviews.ipython.display_hooks. single_frame_plot ( obj ) [source]

Returns plot, renderer and format for single frame export.


magics Module

Inheritance diagram of holoviews.ipython.magics

class holoviews.ipython.magics. CompositorMagic ( *args , **kwargs ) [source]

Bases: IPython.core.magic.Magics

Magic allowing easy definition of compositor operations. Consult %compositor? for more information.

add_traits ( **traits )

Dynamically add trait attributes to the HasTraits instance.

arg_err ( func )

Print docstring if incorrect arguments were passed

class_config_rst_doc ( )

Generate rST documentation for this class’ config options.

Excludes traits defined on parent classes.

class_config_section ( )

Get the config class config section

class_get_help ( inst=None )

Get the help string for this class in ReST format.

If inst is given, it’s current trait values will be used in place of class defaults.

class_get_trait_help ( trait , inst=None )

Get the help string for a single trait.

If inst is given, it’s current trait values will be used in place of the class default.

class_own_traits ( **metadata )

Get a dict of all the traitlets defined on this class, not a parent.

Works like class_traits , except for excluding traits from parents.

class_print_help ( inst=None )

Get the help string for a single trait and print it.

class_trait_names ( **metadata )

Get a list of all the names of this class’ traits.

This method is just like the trait_names() method, but is unbound.

class_traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

This method is just like the traits() method, but is unbound.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

default_option ( fn , optstr )

Make an entry in the options_table for fn, with value optstr

format_latex ( strng )

Format a string for latex inclusion.

has_trait ( name )

Returns True if the object has a trait with the specified name.

hold_trait_notifications ( *args , **kwds )

Context manager for bundling trait change notifications and cross validation.

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

observe ( handler , names=traitlets.All , type='change' )

Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

handler : callable
A callable that is called when a trait changes. Its signature can be handler() or handler(change) , where change is a dictionary. The change dictionary at least holds a ‘type’ key. * type : the type of notification. Other keys may be passed depending on the value of ‘type’. In the case where type is ‘change’, we also have the following keys: * owner : the HasTraits instance * old : the old value of the modified trait attribute * new : the new value of the modified trait attribute * name : the name of the modified trait attribute.
names : list, str, All
If names is All, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
type : str, All (default: ‘change’)
The type of notification to filter by. If equal to All, then all notifications are passed to the observe handler.
on_trait_change ( handler=None , name=None , remove=False )

DEPRECATED: Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).

If remove is True and handler is not specified, all change handlers for the specified name are uninstalled.

handler : callable, None
A callable that is called when a trait changes. Its signature can be handler(), handler(name), handler(name, new), handler(name, old, new), or handler(name, old, new, self).
name : list, str, None
If None, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
remove : bool
If False (the default), then install the handler. If True then unintall it.
parse_options ( arg_str , opt_str , *long_opts , **kw )

Parse options passed to an argument string.

The interface is similar to that of getopt.getopt() , but it returns a Struct with the options as keys and the stripped argument string still as a string.

arg_str is quoted as a true sys.argv vector by using shlex.split. This allows us to easily expand variables, glob files, quote arguments, etc.

arg_str : str
The arguments to parse.
opt_str : str
The options specification.
mode : str, default ‘string’
If given as ‘list’, the argument string is returned as a list (split on whitespace) instead of a string.
list_all : bool, default False
Put all option values in lists. Normally only options appearing more than once are put in a list.
posix : bool, default True
Whether to split the input line in POSIX mode or not, as per the conventions outlined in the shlex module from the standard library.
section_names ( )

return section names as a list

set_trait ( name , value )

Forcibly sets trait attribute, including read-only attributes.

trait_metadata ( traitname , key , default=None )

Get metadata values for trait by key.

trait_names ( **metadata )

Get a list of all the names of this class’ traits.

traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

unobserve ( handler , names=traitlets.All , type='change' )

Remove a trait change handler.

This is used to unregister handlers to trait change notificiations.

handler : callable
The callable called when a trait attribute changes.
names : list, str, All (default: All)
The names of the traits for which the specified handler should be uninstalled. If names is All, the specified handler is uninstalled from the list of notifiers corresponding to all changes.
type : str or All (default: ‘change’)
The type of notification to filter by. If All, the specified handler is uninstalled from the list of notifiers corresponding to all types.
unobserve_all ( name=traitlets.All )

Remove trait change handlers of any type for the specified name. If name is not specified, removes all trait notifiers.

update_config ( config )

Update config and trigger reload of config via trait events

class holoviews.ipython.magics. OptionsMagic ( shell=None , **kwargs ) [source]

Bases: IPython.core.magic.Magics

Base class for magics that are used to specified collections of keyword options.

add_traits ( **traits )

Dynamically add trait attributes to the HasTraits instance.

arg_err ( func )

Print docstring if incorrect arguments were passed

class_config_rst_doc ( )

Generate rST documentation for this class’ config options.

Excludes traits defined on parent classes.

class_config_section ( )

Get the config class config section

class_get_help ( inst=None )

Get the help string for this class in ReST format.

If inst is given, it’s current trait values will be used in place of class defaults.

class_get_trait_help ( trait , inst=None )

Get the help string for a single trait.

If inst is given, it’s current trait values will be used in place of the class default.

class_own_traits ( **metadata )

Get a dict of all the traitlets defined on this class, not a parent.

Works like class_traits , except for excluding traits from parents.

class_print_help ( inst=None )

Get the help string for a single trait and print it.

class_trait_names ( **metadata )

Get a list of all the names of this class’ traits.

This method is just like the trait_names() method, but is unbound.

class_traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

This method is just like the traits() method, but is unbound.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

default_option ( fn , optstr )

Make an entry in the options_table for fn, with value optstr

format_latex ( strng )

Format a string for latex inclusion.

classmethod get_options ( line , options , linemagic ) [source]

Given a keyword specification line, validated and compute options

has_trait ( name )

Returns True if the object has a trait with the specified name.

hold_trait_notifications ( *args , **kwds )

Context manager for bundling trait change notifications and cross validation.

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

observe ( handler , names=traitlets.All , type='change' )

Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

handler : callable
A callable that is called when a trait changes. Its signature can be handler() or handler(change) , where change is a dictionary. The change dictionary at least holds a ‘type’ key. * type : the type of notification. Other keys may be passed depending on the value of ‘type’. In the case where type is ‘change’, we also have the following keys: * owner : the HasTraits instance * old : the old value of the modified trait attribute * new : the new value of the modified trait attribute * name : the name of the modified trait attribute.
names : list, str, All
If names is All, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
type : str, All (default: ‘change’)
The type of notification to filter by. If equal to All, then all notifications are passed to the observe handler.
on_trait_change ( handler=None , name=None , remove=False )

DEPRECATED: Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).

If remove is True and handler is not specified, all change handlers for the specified name are uninstalled.

handler : callable, None
A callable that is called when a trait changes. Its signature can be handler(), handler(name), handler(name, new), handler(name, old, new), or handler(name, old, new, self).
name : list, str, None
If None, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
remove : bool
If False (the default), then install the handler. If True then unintall it.
parse_options ( arg_str , opt_str , *long_opts , **kw )

Parse options passed to an argument string.

The interface is similar to that of getopt.getopt() , but it returns a Struct with the options as keys and the stripped argument string still as a string.

arg_str is quoted as a true sys.argv vector by using shlex.split. This allows us to easily expand variables, glob files, quote arguments, etc.

arg_str : str
The arguments to parse.
opt_str : str
The options specification.
mode : str, default ‘string’
If given as ‘list’, the argument string is returned as a list (split on whitespace) instead of a string.
list_all : bool, default False
Put all option values in lists. Normally only options appearing more than once are put in a list.
posix : bool, default True
Whether to split the input line in POSIX mode or not, as per the conventions outlined in the shlex module from the standard library.
classmethod pprint ( ) [source]

Pretty print the current element options with a maximum width of cls.pprint_width.

section_names ( )

return section names as a list

set_trait ( name , value )

Forcibly sets trait attribute, including read-only attributes.

trait_metadata ( traitname , key , default=None )

Get metadata values for trait by key.

trait_names ( **metadata )

Get a list of all the names of this class’ traits.

traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

unobserve ( handler , names=traitlets.All , type='change' )

Remove a trait change handler.

This is used to unregister handlers to trait change notificiations.

handler : callable
The callable called when a trait attribute changes.
names : list, str, All (default: All)
The names of the traits for which the specified handler should be uninstalled. If names is All, the specified handler is uninstalled from the list of notifiers corresponding to all changes.
type : str or All (default: ‘change’)
The type of notification to filter by. If All, the specified handler is uninstalled from the list of notifiers corresponding to all types.
unobserve_all ( name=traitlets.All )

Remove trait change handlers of any type for the specified name. If name is not specified, removes all trait notifiers.

update_config ( config )

Update config and trigger reload of config via trait events

classmethod update_options ( options , items ) [source]

Allows updating options depending on class attributes and unvalidated options.

class holoviews.ipython.magics. OptsCompleter [source]

Bases: object

Implements the TAB-completion for the %%opts magic.

classmethod dotted_completion ( line , sorted_keys , compositor_defs ) [source]

Supply the appropriate key in Store.options and supply suggestions for further completion.

classmethod option_completer ( k , v ) [source]

Tab completion hook for the %%opts cell magic.

classmethod setup_completer ( ) [source]

Get the dictionary of valid completions

class holoviews.ipython.magics. OptsMagic ( shell=None , **kwargs ) [source]

Bases: IPython.core.magic.Magics

Magic for easy customising of normalization, plot and style options. Consult %%opts? for more information.

add_traits ( **traits )

Dynamically add trait attributes to the HasTraits instance.

arg_err ( func )

Print docstring if incorrect arguments were passed

class_config_rst_doc ( )

Generate rST documentation for this class’ config options.

Excludes traits defined on parent classes.

class_config_section ( )

Get the config class config section

class_get_help ( inst=None )

Get the help string for this class in ReST format.

If inst is given, it’s current trait values will be used in place of class defaults.

class_get_trait_help ( trait , inst=None )

Get the help string for a single trait.

If inst is given, it’s current trait values will be used in place of the class default.

class_own_traits ( **metadata )

Get a dict of all the traitlets defined on this class, not a parent.

Works like class_traits , except for excluding traits from parents.

class_print_help ( inst=None )

Get the help string for a single trait and print it.

class_trait_names ( **metadata )

Get a list of all the names of this class’ traits.

This method is just like the trait_names() method, but is unbound.

class_traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

This method is just like the traits() method, but is unbound.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

default_option ( fn , optstr )

Make an entry in the options_table for fn, with value optstr

format_latex ( strng )

Format a string for latex inclusion.

has_trait ( name )

Returns True if the object has a trait with the specified name.

hold_trait_notifications ( *args , **kwds )

Context manager for bundling trait change notifications and cross validation.

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

observe ( handler , names=traitlets.All , type='change' )

Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

handler : callable
A callable that is called when a trait changes. Its signature can be handler() or handler(change) , where change is a dictionary. The change dictionary at least holds a ‘type’ key. * type : the type of notification. Other keys may be passed depending on the value of ‘type’. In the case where type is ‘change’, we also have the following keys: * owner : the HasTraits instance * old : the old value of the modified trait attribute * new : the new value of the modified trait attribute * name : the name of the modified trait attribute.
names : list, str, All
If names is All, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
type : str, All (default: ‘change’)
The type of notification to filter by. If equal to All, then all notifications are passed to the observe handler.
on_trait_change ( handler=None , name=None , remove=False )

DEPRECATED: Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).

If remove is True and handler is not specified, all change handlers for the specified name are uninstalled.

handler : callable, None
A callable that is called when a trait changes. Its signature can be handler(), handler(name), handler(name, new), handler(name, old, new), or handler(name, old, new, self).
name : list, str, None
If None, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
remove : bool
If False (the default), then install the handler. If True then unintall it.
opts ( line='' , cell=None ) [source]

The opts line/cell magic with tab-completion.

%%opts [ [path] [normalization] [plotting options] [style options]]+

path: A dotted type.group.label specification
(e.g. Image.Grayscale.Photo)
normalization: List of normalization options delimited by braces.
One of | -axiswise | -framewise | +axiswise | +framewise | E.g. { +axiswise +framewise }
plotting options: List of plotting option keywords delimited by
square brackets. E.g. [show_title=False]
style options: List of style option keywords delimited by
parentheses. E.g. (lw=10 marker=’+’)

Note that commas between keywords are optional (not recommended) and that keywords must end in ‘=’ without a separating space.

More information may be found in the class docstring of ipython.parser.OptsSpec.

parse_options ( arg_str , opt_str , *long_opts , **kw )

Parse options passed to an argument string.

The interface is similar to that of getopt.getopt() , but it returns a Struct with the options as keys and the stripped argument string still as a string.

arg_str is quoted as a true sys.argv vector by using shlex.split. This allows us to easily expand variables, glob files, quote arguments, etc.

arg_str : str
The arguments to parse.
opt_str : str
The options specification.
mode : str, default ‘string’
If given as ‘list’, the argument string is returned as a list (split on whitespace) instead of a string.
list_all : bool, default False
Put all option values in lists. Normally only options appearing more than once are put in a list.
posix : bool, default True
Whether to split the input line in POSIX mode or not, as per the conventions outlined in the shlex module from the standard library.
classmethod process_element ( obj ) [source]

To be called by the display hook which supplies the element to be displayed. Any customisation of the object can then occur before final display. If there is any error, a HTML message may be returned. If None is returned, display will proceed as normal.

section_names ( )

return section names as a list

set_trait ( name , value )

Forcibly sets trait attribute, including read-only attributes.

trait_metadata ( traitname , key , default=None )

Get metadata values for trait by key.

trait_names ( **metadata )

Get a list of all the names of this class’ traits.

traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

unobserve ( handler , names=traitlets.All , type='change' )

Remove a trait change handler.

This is used to unregister handlers to trait change notificiations.

handler : callable
The callable called when a trait attribute changes.
names : list, str, All (default: All)
The names of the traits for which the specified handler should be uninstalled. If names is All, the specified handler is uninstalled from the list of notifiers corresponding to all changes.
type : str or All (default: ‘change’)
The type of notification to filter by. If All, the specified handler is uninstalled from the list of notifiers corresponding to all types.
unobserve_all ( name=traitlets.All )

Remove trait change handlers of any type for the specified name. If name is not specified, removes all trait notifiers.

update_config ( config )

Update config and trigger reload of config via trait events

class holoviews.ipython.magics. OutputMagic ( *args , **kwargs ) [source]

Bases: holoviews.ipython.magics.OptionsMagic

Magic for easy customising of display options. Consult %%output? for more information.

add_traits ( **traits )

Dynamically add trait attributes to the HasTraits instance.

arg_err ( func )

Print docstring if incorrect arguments were passed

class_config_rst_doc ( )

Generate rST documentation for this class’ config options.

Excludes traits defined on parent classes.

class_config_section ( )

Get the config class config section

class_get_help ( inst=None )

Get the help string for this class in ReST format.

If inst is given, it’s current trait values will be used in place of class defaults.

class_get_trait_help ( trait , inst=None )

Get the help string for a single trait.

If inst is given, it’s current trait values will be used in place of the class default.

class_own_traits ( **metadata )

Get a dict of all the traitlets defined on this class, not a parent.

Works like class_traits , except for excluding traits from parents.

class_print_help ( inst=None )

Get the help string for a single trait and print it.

class_trait_names ( **metadata )

Get a list of all the names of this class’ traits.

This method is just like the trait_names() method, but is unbound.

class_traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

This method is just like the traits() method, but is unbound.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

default_option ( fn , optstr )

Make an entry in the options_table for fn, with value optstr

format_latex ( strng )

Format a string for latex inclusion.

get_options ( line , options , linemagic )

Given a keyword specification line, validated and compute options

has_trait ( name )

Returns True if the object has a trait with the specified name.

hold_trait_notifications ( *args , **kwds )

Context manager for bundling trait change notifications and cross validation.

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

observe ( handler , names=traitlets.All , type='change' )

Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

handler : callable
A callable that is called when a trait changes. Its signature can be handler() or handler(change) , where change is a dictionary. The change dictionary at least holds a ‘type’ key. * type : the type of notification. Other keys may be passed depending on the value of ‘type’. In the case where type is ‘change’, we also have the following keys: * owner : the HasTraits instance * old : the old value of the modified trait attribute * new : the new value of the modified trait attribute * name : the name of the modified trait attribute.
names : list, str, All
If names is All, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
type : str, All (default: ‘change’)
The type of notification to filter by. If equal to All, then all notifications are passed to the observe handler.
on_trait_change ( handler=None , name=None , remove=False )

DEPRECATED: Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).

If remove is True and handler is not specified, all change handlers for the specified name are uninstalled.

handler : callable, None
A callable that is called when a trait changes. Its signature can be handler(), handler(name), handler(name, new), handler(name, old, new), or handler(name, old, new, self).
name : list, str, None
If None, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
remove : bool
If False (the default), then install the handler. If True then unintall it.
parse_options ( arg_str , opt_str , *long_opts , **kw )

Parse options passed to an argument string.

The interface is similar to that of getopt.getopt() , but it returns a Struct with the options as keys and the stripped argument string still as a string.

arg_str is quoted as a true sys.argv vector by using shlex.split. This allows us to easily expand variables, glob files, quote arguments, etc.

arg_str : str
The arguments to parse.
opt_str : str
The options specification.
mode : str, default ‘string’
If given as ‘list’, the argument string is returned as a list (split on whitespace) instead of a string.
list_all : bool, default False
Put all option values in lists. Normally only options appearing more than once are put in a list.
posix : bool, default True
Whether to split the input line in POSIX mode or not, as per the conventions outlined in the shlex module from the standard library.
pprint ( )

Pretty print the current element options with a maximum width of cls.pprint_width.

section_names ( )

return section names as a list

set_trait ( name , value )

Forcibly sets trait attribute, including read-only attributes.

trait_metadata ( traitname , key , default=None )

Get metadata values for trait by key.

trait_names ( **metadata )

Get a list of all the names of this class’ traits.

traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

unobserve ( handler , names=traitlets.All , type='change' )

Remove a trait change handler.

This is used to unregister handlers to trait change notificiations.

handler : callable
The callable called when a trait attribute changes.
names : list, str, All (default: All)
The names of the traits for which the specified handler should be uninstalled. If names is All, the specified handler is uninstalled from the list of notifiers corresponding to all changes.
type : str or All (default: ‘change’)
The type of notification to filter by. If All, the specified handler is uninstalled from the list of notifiers corresponding to all types.
unobserve_all ( name=traitlets.All )

Remove trait change handlers of any type for the specified name. If name is not specified, removes all trait notifiers.

update_config ( config )

Update config and trigger reload of config via trait events

classmethod update_options ( options , items ) [source]

Switch default options and backend if new backend is supplied in items.

class holoviews.ipython.magics. TimerMagic ( shell=None , **kwargs ) [source]

Bases: IPython.core.magic.Magics

A line magic for measuring the execution time of multiple cells.

After you start/reset the timer with ‘%timer start’ you may view elapsed time with any subsequent calls to %timer.

add_traits ( **traits )

Dynamically add trait attributes to the HasTraits instance.

arg_err ( func )

Print docstring if incorrect arguments were passed

class_config_rst_doc ( )

Generate rST documentation for this class’ config options.

Excludes traits defined on parent classes.

class_config_section ( )

Get the config class config section

class_get_help ( inst=None )

Get the help string for this class in ReST format.

If inst is given, it’s current trait values will be used in place of class defaults.

class_get_trait_help ( trait , inst=None )

Get the help string for a single trait.

If inst is given, it’s current trait values will be used in place of the class default.

class_own_traits ( **metadata )

Get a dict of all the traitlets defined on this class, not a parent.

Works like class_traits , except for excluding traits from parents.

class_print_help ( inst=None )

Get the help string for a single trait and print it.

class_trait_names ( **metadata )

Get a list of all the names of this class’ traits.

This method is just like the trait_names() method, but is unbound.

class_traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

This method is just like the traits() method, but is unbound.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

default_option ( fn , optstr )

Make an entry in the options_table for fn, with value optstr

format_latex ( strng )

Format a string for latex inclusion.

has_trait ( name )

Returns True if the object has a trait with the specified name.

hold_trait_notifications ( *args , **kwds )

Context manager for bundling trait change notifications and cross validation.

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

observe ( handler , names=traitlets.All , type='change' )

Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

handler : callable
A callable that is called when a trait changes. Its signature can be handler() or handler(change) , where change is a dictionary. The change dictionary at least holds a ‘type’ key. * type : the type of notification. Other keys may be passed depending on the value of ‘type’. In the case where type is ‘change’, we also have the following keys: * owner : the HasTraits instance * old : the old value of the modified trait attribute * new : the new value of the modified trait attribute * name : the name of the modified trait attribute.
names : list, str, All
If names is All, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
type : str, All (default: ‘change’)
The type of notification to filter by. If equal to All, then all notifications are passed to the observe handler.
on_trait_change ( handler=None , name=None , remove=False )

DEPRECATED: Setup a handler to be called when a trait changes.

This is used to setup dynamic notifications of trait changes.

Static handlers can be created by creating methods on a HasTraits subclass with the naming convention ‘_[traitname]_changed’. Thus, to create static handler for the trait ‘a’, create the method _a_changed(self, name, old, new) (fewer arguments can be used, see below).

If remove is True and handler is not specified, all change handlers for the specified name are uninstalled.

handler : callable, None
A callable that is called when a trait changes. Its signature can be handler(), handler(name), handler(name, new), handler(name, old, new), or handler(name, old, new, self).
name : list, str, None
If None, the handler will apply to all traits. If a list of str, handler will apply to all names in the list. If a str, the handler will apply just to that name.
remove : bool
If False (the default), then install the handler. If True then unintall it.
parse_options ( arg_str , opt_str , *long_opts , **kw )

Parse options passed to an argument string.

The interface is similar to that of getopt.getopt() , but it returns a Struct with the options as keys and the stripped argument string still as a string.

arg_str is quoted as a true sys.argv vector by using shlex.split. This allows us to easily expand variables, glob files, quote arguments, etc.

arg_str : str
The arguments to parse.
opt_str : str
The options specification.
mode : str, default ‘string’
If given as ‘list’, the argument string is returned as a list (split on whitespace) instead of a string.
list_all : bool, default False
Put all option values in lists. Normally only options appearing more than once are put in a list.
posix : bool, default True
Whether to split the input line in POSIX mode or not, as per the conventions outlined in the shlex module from the standard library.
section_names ( )

return section names as a list

set_trait ( name , value )

Forcibly sets trait attribute, including read-only attributes.

timer ( line='' ) [source]

Timer magic to print initial date/time information and subsequent elapsed time intervals.

To start the timer, run:

%timer start

This will print the start date and time.

Subsequent calls to %timer will print the elapsed time relative to the time when %timer start was called. Subsequent calls to %timer start may also be used to reset the timer.

trait_metadata ( traitname , key , default=None )

Get metadata values for trait by key.

trait_names ( **metadata )

Get a list of all the names of this class’ traits.

traits ( **metadata )

Get a dict of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects.

The TraitTypes returned don’t know anything about the values that the various HasTrait’s instances are holding.

The metadata kwargs allow functions to be passed in which filter traits based on metadata values. The functions should take a single value as an argument and return a boolean. If any function returns False, then the trait is not included in the output. If a metadata key doesn’t exist, None will be passed to the function.

unobserve ( handler , names=traitlets.All , type='change' )

Remove a trait change handler.

This is used to unregister handlers to trait change notificiations.

handler : callable
The callable called when a trait attribute changes.
names : list, str, All (default: All)
The names of the traits for which the specified handler should be uninstalled. If names is All, the specified handler is uninstalled from the list of notifiers corresponding to all changes.
type : str or All (default: ‘change’)
The type of notification to filter by. If All, the specified handler is uninstalled from the list of notifiers corresponding to all types.
unobserve_all ( name=traitlets.All )

Remove trait change handlers of any type for the specified name. If name is not specified, removes all trait notifiers.

update_config ( config )

Update config and trigger reload of config via trait events

holoviews.ipython.magics. list_formats ( format_type , backend=None ) [source]

Returns list of supported formats for a particular backend.


parser Module

Inheritance diagram of holoviews.ipython.parser

The magics offered by the HoloViews IPython extension are powerful and support rich, compositional specifications. To avoid the the brittle, convoluted code that results from trying to support the syntax in pure Python, this file defines suitable parsers using pyparsing that are cleaner and easier to understand.

Pyparsing is required by matplotlib and will therefore be available if HoloViews is being used in conjunction with matplotlib.

class holoviews.ipython.parser. CompositorSpec [source]

Bases: holoviews.ipython.parser.Parser

The syntax for defining a set of compositor is as follows:

[ mode op(spec) [settings] value ]+

The components are:

mode : Operation mode, either ‘data’ or ‘display’. group : Value identifier with capitalized initial letter. op : The name of the operation to apply. spec : Overlay specification of form (A * B) where A and B are

dotted path specifications.
settings : Optional list of keyword arguments to be used as
parameters to the operation (in square brackets).
collect_tokens ( parseresult , mode )

Collect the tokens from a (potentially) nested parse result.

classmethod parse ( line , ns={} ) [source]

Parse compositor specifications, returning a list Compositors

todict ( parseresult , mode='parens' , ns={} )

Helper function to return dictionary given the parse results from a pyparsing.nestedExpr object (containing keywords).

The ns is a dynamic namespace (typically the IPython Notebook namespace) used to update the class-level namespace.

class holoviews.ipython.parser. OptsSpec [source]

Bases: holoviews.ipython.parser.Parser

An OptsSpec is a string specification that describes an OptionTree. It is a list of tree path specifications (using dotted syntax) separated by keyword lists for any of the style, plotting or normalization options. These keyword lists are denoted ‘plot(..)’, ‘style(...)’ and ‘norm(...)’ respectively. These three groups may be specified even more concisely using keyword lists delimited by square brackets, parentheses and braces respectively. All these sets are optional and may be supplied in any order.

For instance, the following string:

Image (interpolation=None) plot(show_title=False) Curve style(color=’r’)

Would specify an OptionTree where Image has “interpolation=None” for style and ‘show_title=False’ for plot options. The Curve has a style set such that color=’r’.

The parser is fairly forgiving; commas between keywords are optional and additional spaces are often allowed. The only restriction is that keywords must be immediately followed by the ‘=’ sign (no space).

classmethod apply_deprecations ( path ) [source]

Convert any potentially deprecated paths and issue appropriate warnings

collect_tokens ( parseresult , mode )

Collect the tokens from a (potentially) nested parse result.

classmethod parse ( line , ns={} ) [source]

Parse an options specification, returning a dictionary with path keys and {‘plot’:<options>, ‘style’:<options>} values.

classmethod process_normalization ( parse_group ) [source]

Given a normalization parse group (i.e. the contents of the braces), validate the option list and compute the appropriate integer value for the normalization plotting option.

todict ( parseresult , mode='parens' , ns={} )

Helper function to return dictionary given the parse results from a pyparsing.nestedExpr object (containing keywords).

The ns is a dynamic namespace (typically the IPython Notebook namespace) used to update the class-level namespace.

class holoviews.ipython.parser. Parser [source]

Bases: object

Base class for magic line parsers, designed for forgiving parsing of keyword lists.

classmethod collect_tokens ( parseresult , mode ) [source]

Collect the tokens from a (potentially) nested parse result.

classmethod todict ( parseresult , mode='parens' , ns={} ) [source]

Helper function to return dictionary given the parse results from a pyparsing.nestedExpr object (containing keywords).

The ns is a dynamic namespace (typically the IPython Notebook namespace) used to update the class-level namespace.


widgets Module

Inheritance diagram of holoviews.ipython.widgets

class holoviews.ipython.widgets. ProgressBar ( **params ) [source]

Bases: holoviews.core.util.ProgressIndicator

A simple text progress bar suitable for both the IPython notebook and the IPython interactive prompt.

ProgressBars are automatically nested if a previous instantiated progress bars has not achieved 100% completion.

param Boolean elapsed_time ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
If enabled, the progress bar will disappear and display the total elapsed time once 100% completion is reached.
param String label ( allow_None=True, basestring=<type ‘basestring’>, constant=False, default=Progress, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The label of the current progress bar.
param NumericTuple percent_range ( allow_None=False, constant=False, default=(0.0, 100.0), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
The total percentage spanned by the progress bar when called with a value between 0% and 100%. This allows an overall completion in percent to be broken down into smaller sub-tasks that individually complete to 100 percent.
param Integer width ( allow_None=False, bounds=None, constant=False, default=70, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
The width of the progress bar as the number of chararacters
param String fill_char ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=#, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The character used to fill the progress bar.
param String blank_char ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default= , instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The character for the blank portion of the progress bar.
param ObjectSelector display ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=stdout, instantiate=False, objects=[‘stdout’, ‘disabled’, ‘broadcast’], pickle_default_value=True, precedence=None, readonly=False )
Parameter to control display of the progress bar. By default, progress is shown on stdout but this may be disabled e.g. for jobs that log standard output to file. If the output mode is set to ‘broadcast’, a socket is opened on a stated port to broadcast the completion percentage. The RemoteProgress class may then be used to view the progress from a different process.
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 object>
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 object>
inspect_value = <functools.partial object>
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 object>
set_param = <functools.partial object>
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.

class holoviews.ipython.widgets. RemoteProgress ( port , **params ) [source]

Bases: holoviews.ipython.widgets.ProgressBar

Connect to a progress bar in a separate process with output_mode set to ‘broadcast’ in order to display the results (to stdout).

param Boolean elapsed_time ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
If enabled, the progress bar will disappear and display the total elapsed time once 100% completion is reached.
param String hostname ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=localhost, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Hostname where progress is being broadcast.
param String label ( allow_None=True, basestring=<type ‘basestring’>, constant=False, default=Progress, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The label of the current progress bar.
param NumericTuple percent_range ( allow_None=False, constant=False, default=(0.0, 100.0), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
The total percentage spanned by the progress bar when called with a value between 0% and 100%. This allows an overall completion in percent to be broken down into smaller sub-tasks that individually complete to 100 percent.
param Integer width ( allow_None=False, bounds=None, constant=False, default=70, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
The width of the progress bar as the number of chararacters
param String fill_char ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=#, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The character used to fill the progress bar.
param Integer port ( allow_None=False, bounds=None, constant=False, default=8080, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
Target port on hostname.
param String blank_char ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default= , instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The character for the blank portion of the progress bar.
param ObjectSelector display ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=stdout, instantiate=False, objects=[‘stdout’, ‘disabled’, ‘broadcast’], pickle_default_value=True, precedence=None, readonly=False )
Parameter to control display of the progress bar. By default, progress is shown on stdout but this may be disabled e.g. for jobs that log standard output to file. If the output mode is set to ‘broadcast’, a socket is opened on a stated port to broadcast the completion percentage. The RemoteProgress class may then be used to view the progress from a different process.
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 object>
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 object>
inspect_value = <functools.partial object>
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 object>
set_param = <functools.partial object>
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.

class holoviews.ipython.widgets. RunProgress ( **params ) [source]

Bases: holoviews.ipython.widgets.ProgressBar

RunProgress breaks up the execution of a slow running command so that the level of completion can be displayed during execution.

This class is designed to run commands that take a single numeric argument that acts additively. Namely, it is expected that a slow running command ‘run_hook(X+Y)’ can be arbitrarily broken up into multiple, faster executing calls ‘run_hook(X)’ and ‘run_hook(Y)’ without affecting the overall result.

For instance, this is suitable for simulations where the numeric argument is the simulated time - typically, advancing 10 simulated seconds takes about twice as long as advancing by 5 seconds.

param Boolean elapsed_time ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
If enabled, the progress bar will disappear and display the total elapsed time once 100% completion is reached.
param Callable run_hook ( allow_None=False, constant=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
By default updates time in param which is very fast and does not need a progress bar. Should be set to some slower running callable where display of progress level is desired.
param Number interval ( allow_None=False, bounds=None, constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
The run interval used to break up updates to the progress bar.
param String label ( allow_None=True, basestring=<type ‘basestring’>, constant=False, default=Progress, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The label of the current progress bar.
param NumericTuple percent_range ( allow_None=False, constant=False, default=(0.0, 100.0), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
The total percentage spanned by the progress bar when called with a value between 0% and 100%. This allows an overall completion in percent to be broken down into smaller sub-tasks that individually complete to 100 percent.
param Integer width ( allow_None=False, bounds=None, constant=False, default=70, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
The width of the progress bar as the number of chararacters
param String fill_char ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=#, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The character used to fill the progress bar.
param String blank_char ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default= , instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The character for the blank portion of the progress bar.
param ObjectSelector display ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=stdout, instantiate=False, objects=[‘stdout’, ‘disabled’, ‘broadcast’], pickle_default_value=True, precedence=None, readonly=False )
Parameter to control display of the progress bar. By default, progress is shown on stdout but this may be disabled e.g. for jobs that log standard output to file. If the output mode is set to ‘broadcast’, a socket is opened on a stated port to broadcast the completion percentage. The RemoteProgress class may then be used to view the progress from a different process.
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 object>
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 object>
inspect_value = <functools.partial object>
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 object>
set_param = <functools.partial object>
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.

holoviews.ipython.widgets. progress ( iterator , enum=False , length=None ) [source]

A helper utility to display a progress bar when iterating over a collection of a fixed length or a generator (with a declared length).

If enum=True, then equivalent to enumerate with a progress bar.