Center a SubTitle in a ggplot2 graphic

I want to center a SubTitle in a ggplot2 graphic.

For the title is easy because I can use easy_center_title() in ggeasy package.

Can you help me pelase?

You have been asking quite a few related questions, so it's best you can refer to the documentation:
Function reference • ggplot2 (

In this case add this to your code:

theme(plot.subtitle = element_text(hjust = 0.5))

Modify components of a theme — theme • ggplot2 (
Theme elements — margin • ggplot2 (

1 Like

Thank you @martin.R you solved my problem.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.