Name | reportree JSON |
Version |
0.0.4
JSON |
| download |
home_page | None |
Summary | ReporTree produces nested static HTML reports with buttons to navigate through many matplotlib plots. |
upload_time | 2023-01-21 10:31:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
plots
matplotlib
data science
reports
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
|doc-badge|
.. |doc-badge| image:: https://github.com/protivinsky/reportree/actions/workflows/builddoc.yaml/badge.svg
:alt: doc
:target: https://protivinsky.github.io/reportree/index.html
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.
.. warning::
The selection of pages in nested reports works correctly only when served from the webserver (even the Python one
works fine for local development, `python -m http.server`).
The selection is done via Javascript and the targets are loaded on the fly. When the reports are
displayed locally, different files are considered as Cross-Origin access and the loading is blocked
by the browser. Single page reports (i.e. Leaves) work fine.
This issue can be solved by using Mozilla Firefox for local browsing with changing
`security.fileuri.strict_origin_policy` to `false` (in `about:config`).
Basic example
-------------
.. code:: python
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
............
.. image:: https://raw.githubusercontent.com/protivinsky/reportree/main/doc/images/example1.png
:width: 1000
:alt: Example 1
Branch example
..............
.. image:: https://raw.githubusercontent.com/protivinsky/reportree/main/doc/images/example2.png
:width: 1000
:alt: Example 2
Nested example
..............
.. image:: https://raw.githubusercontent.com/protivinsky/reportree/main/doc/images/example3.png
:width: 1000
:alt: Example 3
Raw data
{
"_id": null,
"home_page": null,
"name": "reportree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "plots,matplotlib,data science,reports",
"author": null,
"author_email": "Tomas Protivinsky <tomas.protivinsky@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/73/9d/289fd6da4fa58d4ffba9cdd6be2a18b7369d33e857191d70664de94c03e6/reportree-0.0.4.tar.gz",
"platform": null,
"description": "|doc-badge|\n\n.. |doc-badge| image:: https://github.com/protivinsky/reportree/actions/workflows/builddoc.yaml/badge.svg\n :alt: doc\n :target: https://protivinsky.github.io/reportree/index.html\n\nReporTree: Nested HTML reports for Matplotlib\n=============================================\n\nReporTree produces nested static HTML reports with buttons to navigate through many matplotlib plots.\nThe package can easily produce reports with many nested levels and hundreds of Matplotlib plots.\n\n.. warning::\n The selection of pages in nested reports works correctly only when served from the webserver (even the Python one\n works fine for local development, `python -m http.server`).\n\n The selection is done via Javascript and the targets are loaded on the fly. When the reports are\n displayed locally, different files are considered as Cross-Origin access and the loading is blocked\n by the browser. Single page reports (i.e. Leaves) work fine.\n\n This issue can be solved by using Mozilla Firefox for local browsing with changing\n `security.fileuri.strict_origin_policy` to `false` (in `about:config`).\n\nBasic example\n-------------\n\n.. code:: python\n\n import reportree as rt\n import seaborn as sns\n import matplotlib.pyplot as plt\n import numpy as np\n\n\n fig1, ax1 = plt.subplots()\n sns.lineplot(x=np.arange(10), y=np.arange(10), marker='o', ax=ax1, color='red')\n ax1.set_title('Upward')\n\n fig2, ax2 = plt.subplots()\n sns.lineplot(x=np.arange(10), y=np.arange(10, 0, -1), marker='o', ax=ax2, color='blue')\n ax2.set_title('Downward')\n\n l1 = rt.Leaf([fig1, fig2], title='Leaf example')\n l1.save('/tmp/example1')\n\n l2 = rt.Leaf(fig1, title='Only upward')\n l3 = rt.Leaf(fig2, title='Only downward')\n\n b1 = rt.Branch([l1, l2, l3], title='Branch example')\n b1.save('/tmp/example2')\n\n b2 = rt.Branch([rt.Branch([b1, l1]), l2, l3, b1], title='Nested example')\n b2.save('/tmp/example3')\n\nThe code produces following reports:\n\nLeaf example\n............\n\n.. image:: https://raw.githubusercontent.com/protivinsky/reportree/main/doc/images/example1.png\n :width: 1000\n :alt: Example 1\n\nBranch example\n..............\n\n.. image:: https://raw.githubusercontent.com/protivinsky/reportree/main/doc/images/example2.png\n :width: 1000\n :alt: Example 2\n\nNested example\n..............\n\n.. image:: https://raw.githubusercontent.com/protivinsky/reportree/main/doc/images/example3.png\n :width: 1000\n :alt: Example 3\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "ReporTree produces nested static HTML reports with buttons to navigate through many matplotlib plots.",
"version": "0.0.4",
"split_keywords": [
"plots",
"matplotlib",
"data science",
"reports"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4de3292cbf2afac00a13031d63d7aa8c8dd75a15a057deb47876a623122bbef5",
"md5": "8b3a457e1fe0e4b8e17ac05289f9874c",
"sha256": "dcf58dd69efd68c2447379ad220f7bf590e8ecbb35e4de70e43d632291bc73a9"
},
"downloads": -1,
"filename": "reportree-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b3a457e1fe0e4b8e17ac05289f9874c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 9849,
"upload_time": "2023-01-21T10:31:22",
"upload_time_iso_8601": "2023-01-21T10:31:22.358863Z",
"url": "https://files.pythonhosted.org/packages/4d/e3/292cbf2afac00a13031d63d7aa8c8dd75a15a057deb47876a623122bbef5/reportree-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "739d289fd6da4fa58d4ffba9cdd6be2a18b7369d33e857191d70664de94c03e6",
"md5": "6de159a2bafa73273fae62ff9cf17c82",
"sha256": "1efc43b8caa2d8b0b629452f8908f096727a8eac9531d296bf19e836b81e7a8e"
},
"downloads": -1,
"filename": "reportree-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "6de159a2bafa73273fae62ff9cf17c82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 111349,
"upload_time": "2023-01-21T10:31:31",
"upload_time_iso_8601": "2023-01-21T10:31:31.635517Z",
"url": "https://files.pythonhosted.org/packages/73/9d/289fd6da4fa58d4ffba9cdd6be2a18b7369d33e857191d70664de94c03e6/reportree-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-21 10:31:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "reportree"
}