We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1cf152 commit 5f6833fCopy full SHA for 5f6833f
1 file changed
control/ctrlplot.py
@@ -68,13 +68,11 @@ def suptitle(
68
fig.suptitle(title, **kwargs)
69
70
elif frame == 'axes':
71
- # TODO: move common plotting params to 'ctrlplot'
72
with plt.rc_context(rcParams):
73
- plt.tight_layout() # Put the figure into proper layout
+ fig.suptitle(title, **kwargs) # Place title in center
+ plt.tight_layout() # Put everything into place
74
xc, _ = _find_axes_center(fig, fig.get_axes())
75
-
76
- fig.suptitle(title, x=xc, **kwargs)
77
- plt.tight_layout() # Update the layout
+ fig.suptitle(title, x=xc, **kwargs) # Redraw title, centered
78
79
else:
80
raise ValueError(f"unknown frame '{frame}'")
0 commit comments