Skip to content

Commit

Permalink
add settings for group report
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDonoghue committed Jun 29, 2023
1 parent 117cbc0 commit 1ea27cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion fooof/core/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def save_report_fg(fg, file_name, file_path=None):

# Initialize figure
_ = plt.figure(figsize=REPORT_FIGSIZE)
grid = gridspec.GridSpec(3, 2, wspace=0.4, hspace=0.25, height_ratios=[0.8, 1.0, 1.0])
grid = gridspec.GridSpec(4, 2, wspace=0.4, hspace=0.25, height_ratios=[0.8, 1.0, 1.0, 0.5])

# First / top: text results
ax0 = plt.subplot(grid[0, :])
Expand All @@ -92,6 +92,8 @@ def save_report_fg(fg, file_name, file_path=None):
ax0.set_xticks([])
ax0.set_yticks([])

# Second - data plots

# Aperiodic parameters plot
ax1 = plt.subplot(grid[1, 0])
plot_fg_ap(fg, ax1)
Expand All @@ -104,6 +106,14 @@ def save_report_fg(fg, file_name, file_path=None):
ax3 = plt.subplot(grid[2, :])
plot_fg_peak_cens(fg, ax3)

# Third - Model settings
ax4 = plt.subplot(grid[3, :])
settings_str = gen_settings_str(fg, False)
ax4.text(0.5, 0.1, settings_str, REPORT_FONT, ha='center', va='center')
ax4.set_frame_on(False)
ax4.set_xticks([])
ax4.set_yticks([])

# Save out the report
plt.savefig(fpath(file_path, fname(file_name, SAVE_FORMAT)))
plt.close()

0 comments on commit 1ea27cb

Please sign in to comment.