Skip to main content

Generate simple HTML dashboards using matplotlib

Project description

Matplotboard

A utility to generate html dashboards using matplotlib. Matplotboard makes it easy to wrap your plotting functions and embed them into a Markdown document. This is best demonstrated with an example.

import numpy as np
import matplotlib.pyplot as plt

from matplotboard import (decl_fig, render, generate_report)


@decl_fig
def cool_fig():
    xs = np.linspace(-10,10, 100)
    ys = xs**2
    plt.plot(xs, ys)


@decl_fig
def fig_with_args(amp, freq):
    '''
    A plot of a sine wave with configurable amplitude and frequency.
    '''
    xs = np.linspace(-np.pi, np.pi, 100)
    ys = amp*np.sin(xs*freq)
    plt.plot(xs, ys)


if __name__ == '__main__':
    figures = {'my_cool_fig': cool_fig,
               'slow': (fig_with_args, (1, np.pi)),
               'fast': (fig_with_args, (0.75, 3*np.pi)),
               }

    render(figures)
    generate_report(figures, 'Report',
                    source=__file__,
                    body="""
# Making **Awesome Dashboards**

Sometimes you just want to push out a static html page with plots and relevant
commentary. For example, what does a parabola look like?

fig::my_cool_fig

There we go, `matplotboard` also supports plotting functions that take arguments.

fig::slow
fig::fast

    """)

You can view the fantastic generated report here

Project details


Release history Release notifications

This version
History Node

0.6.1

History Node

0.6.0

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.1

History Node

0.4.0

History Node

0.3.1

History Node

0.3.0

History Node

0.2.1

History Node

0.2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
matplotboard-0.6.1.tar.gz (19.9 kB) Copy SHA256 hash SHA256 Source None May 14, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page