We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53c5e4d commit 8d2fd25Copy full SHA for 8d2fd25
fooof/plts/style.py
@@ -169,7 +169,10 @@ def apply_custom_style(ax, **kwargs):
169
ax.legend(prop={'size': kwargs.pop('legend_size', LEGEND_SIZE)},
170
loc=kwargs.pop('legend_loc', LEGEND_LOC))
171
172
- plt.tight_layout()
+ # Apply tight layout to the figure object
173
+ # This should be equivalent to `plt.tight_layout()`, but seems to raise fewer warnings...
174
+ fig = plt.gcf()
175
+ fig.set_layout_engine('tight')
176
177
178
def apply_style(ax, axis_styler=apply_axis_style, line_styler=apply_line_style,
0 commit comments