Skip to content

Commit 00d556d

Browse files
committed
add model report plot to report tutorial
1 parent 1dac3e5 commit 00d556d

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

tutorials/plot_09-Reporting.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
2-
Reporting & Referencing
3-
=======================
2+
09: Reporting & Referencing
3+
===========================
44
5-
This example covers utilities for getting reporting information and referencing use of the module.
5+
This section covers how to access reporting info and reference use of the module.
66
77
This page is a hands-on example of the reporting and referencing information on the
88
`Reference page <https://fooof-tools.github.io/fooof/reference.html>`_.
@@ -19,6 +19,19 @@
1919
# Import utilities to print out information for reporting
2020
from fooof.utils.reports import methods_report_info, methods_report_text
2121

22+
# sphinx_gallery_start_ignore
23+
# Note: this code gets hidden, but serves to create the text plot for the icon
24+
from fooof.core.strings import gen_methods_report_str
25+
from fooof.core.reports import REPORT_FONT
26+
import matplotlib.pyplot as plt
27+
text = gen_methods_report_str(concise=True)
28+
text = text[0:142] + '\n' + text[142:]
29+
_, ax = plt.subplots(figsize=(8, 3))
30+
ax.text(0.5, 0.5, text, REPORT_FONT, ha='center', va='center')
31+
ax.set_frame_on(False)
32+
_ = ax.set(xticks=[], yticks=[])
33+
# sphinx_gallery_end_ignore
34+
2235
###################################################################################################
2336
# Checking Module Version
2437
# -----------------------

0 commit comments

Comments
 (0)