Skip to main content

ReporTree produces nested static HTML reports with buttons to navigate through many matplotlib plots.

Project description

doc

ReporTree: Nested HTML reports for Matplotlib

ReporTree produces nested static HTML reports with buttons to navigate through many matplotlib plots. The package can easily produce reports with many nested levels and hundreds of Matplotlib plots.

Basic example

import reportree as rt
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np


fig1, ax1 = plt.subplots()
sns.lineplot(x=np.arange(10), y=np.arange(10), marker='o', ax=ax1, color='red')
ax1.set_title('Upward')

fig2, ax2 = plt.subplots()
sns.lineplot(x=np.arange(10), y=np.arange(10, 0, -1), marker='o', ax=ax2, color='blue')
ax2.set_title('Downward')

l1 = rt.Leaf([fig1, fig2], title='Leaf example')
l1.save('/tmp/example1')

l2 = rt.Leaf(fig1, title='Only upward')
l3 = rt.Leaf(fig2, title='Only downward')

b1 = rt.Branch([l1, l2, l3], title='Branch example')
b1.save('/tmp/example2')

b2 = rt.Branch([rt.Branch([b1, l1]), l2, l3, b1], title='Nested example')
b2.save('/tmp/example3')

The code produces following reports:

Leaf example

Example 1

Branch example

Example 2

Nested example

Example 3

Project details


Download files

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

Source Distribution

reportree-0.0.4.tar.gz (111.3 kB view hashes)

Uploaded Source

Built Distribution

reportree-0.0.4-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page