The suptitle here is not centered. It appears to the left. How do I fix this? [code]
- User
The suptitle here is not centered. It appears to the left. How do I fix this?
plt.suptitle(f'Offline Tendency Biases for {model_names[model_name]} {config_names[config_name]} (seed {seed[5:]})', fontsize=14) plt.subplots_adjust(right=1, top=0.92) - Assistant
The issue is likely due to the
plt.subplots_adjust(right=1, top=0.92)line. When you setright=1, you are telling matplotlib that the right edge of your subplots should be at the very edge of the figure, but the default isright=0.9. This can cause the suptitle to appear off-center, because the "center" is calculated based on the subplot area, not the whole figure.How to fix:
-
Remove or adjust the
rightparameter
Try removingright=1from yourplt.subplots_adjust()call, or set it back to the default (right=0.9):plt.subplots_adjust(top=0.92) # or plt.subplots_adjust(right=0.9, top=0.92) -
Use the
xparameter insuptitle(if needed)
If you still need to fine-tune the centering, you can use thexparameter inplt.suptitle()to manually adjust the horizontal position. The default isx=0.5(centered):plt.suptitle('Your title', x=0.5)
Summary:
- The suptitle is off-center because
right=1stretches the subplot area, shifting the "center". - Remove or reset
rightinplt.subplots_adjust(). - Optionally, use
x=0.5inplt.suptitle()for explicit centering.
Example:
plt.suptitle(f'Offline Tendency Biases for {model_names[model_name]} {config_names[config_name]} (seed {seed[5:]})', fontsize=14) plt.subplots_adjust(top=0.92) # Don't set right=1Let me know if you need more help!
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.