module graphhelper.magic_graph

Inheritance diagram of pyensae.graphhelper.magic_graph

Short summary

module pyensae.graphhelper.magic_graph

Magic commands about graphs

Classes

class

truncated documentation

MagicGraph

Defines magic commands about graphs

Functions

function

truncated documentation

register_graph_magics

register magics function, can be called from a notebook

Properties

property

truncated documentation

Context

return the context or None

cross_validation_lock

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

mpl_style_parser

defines the way to parse the magic command %mpl_style

Methods

method

truncated documentation

mpl_style

defines %mpl_style which changes the style of matplotlib graphs, example: %mpl_style ggplot

Documentation

Magic commands about graphs

New in version 1.1.

source on GitHub

class pyensae.graphhelper.magic_graph.MagicGraph(shell=None, **kwargs)[source]

Bases: pyquickhelper.ipythonhelper.magic_class.MagicClassWithHelpers

Defines magic commands about graphs

New in version 1.1.

source on GitHub

Create a configurable given a config config.

Parameters
  • config (Config) – If this is empty, default values are used. If config is a Config instance, it will be used to configure the instance.

  • parent (Configurable instance, optional) – The parent Configurable instance of this object.

Notes

Subclasses of Configurable must call the __init__() method of Configurable before doing anything else and using super():

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.

_trait_default_generators = {}
mpl_style(line)[source]

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.

source on GitHub

static mpl_style_parser()[source]

defines the way to parse the magic command %mpl_style

source on GitHub

pyensae.graphhelper.magic_graph.register_graph_magics(ip=None)[source]

register magics function, can be called from a notebook

Parameters

ip – from get_ipython()

source on GitHub