module graphhelper.magic_graph
¶
Short summary¶
module pyensae.graphhelper.magic_graph
Magic commands about graphs
Classes¶
class |
truncated documentation |
---|---|
Defines magic commands about graphs |
Functions¶
function |
truncated documentation |
---|---|
register magics function, can be called from a notebook |
Properties¶
property |
truncated documentation |
---|---|
|
return the context or None |
|
A contextmanager for running a block with our cross validation lock set to True. At the end of the block, … |
Static Methods¶
staticmethod |
truncated documentation |
---|---|
defines the way to parse the magic command |
Methods¶
method |
truncated documentation |
---|---|
defines |
Documentation¶
Magic commands about graphs
New in version 1.1.
- class pyensae.graphhelper.magic_graph.MagicGraph(**kwargs: Any)¶
Bases:
MagicClassWithHelpers
Defines magic commands about graphs
New in version 1.1.
Create a configurable given a config config.
Parameters¶
- configConfig
If this is empty, default values are used. If config is a
Config
instance, it will be used to configure the instance.- parentConfigurable instance, optional
The parent Configurable instance of this object.
Notes¶
Subclasses of Configurable must call the
__init__()
method ofConfigurable
before doing anything else and usingsuper()
:class MyConfigurable(Configurable): def __init__(self, config=None): super(MyConfigurable, self).__init__(config=config) # Then any other code you need to finish initialization.
This ensures that instances will be configured properly.
- _all_trait_default_generators: Dict[str, Any] = {'config': <bound method TraitType.default of <traitlets.traitlets.Instance object>>, 'parent': <bound method TraitType.default of <traitlets.traitlets.Instance object>>}¶
- _descriptors = [<traitlets.traitlets.ObserveHandler object>, <traitlets.traitlets.Instance object>, <traitlets.traitlets.Instance object>]¶
- _instance_inits = [<bound method ObserveHandler.instance_init of <traitlets.traitlets.ObserveHandler object>>, <bound method Instance.instance_init of <traitlets.traitlets.Instance object>>, <bound method Instance.instance_init of <traitlets.traitlets.Instance object>>]¶
- _trait_default_generators = {}¶
- _traits: Dict[str, Any] = {'config': <traitlets.traitlets.Instance object>, 'parent': <traitlets.traitlets.Instance object>}¶
- mpl_style(line)¶
defines
%mpl_style
which changes the style of matplotlib graphs, example:%mpl_style ggplot
mpl_style
This magic just does:
import matplotlib.pyplot as plt plt.style.use('ggplot')
It should take place at the beginning of the notebook.
- static mpl_style_parser()¶
defines the way to parse the magic command
%mpl_style
- pyensae.graphhelper.magic_graph.register_graph_magics(ip=None)¶
register magics function, can be called from a notebook
- Parameters:
ip – from
get_ipython()