Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature request: add plot_annotation to add Titles, subtitles and captions to composite plots #966

@BasBBakkerIMF

Description

@BasBBakkerIMF

In R, you can add a title, subtitle, and caption to a combined plot using plot_annotation.
Would be great if plotnine could add that as well!

patchwork_output_2<- patchwork_layout_2 +
plot_annotation(
title = 'Figure 7. Fiscal Sector Developments',
subtitle = '(In US dollars)',
caption="Sources: ",
theme = theme(plot.title = element_text(color=blue,
family=primary_font,face="bold",
size=20, hjust = 0.5),

            plot.subtitle = element_text(color="black",
                                         family=primary_font,
                                         face="plain",
                                         hjust=0.5,
                                         size=20),
            plot.caption = element_text(hjust = 0,size=12,
                                        family=primary_font,
            ),
            plot.margin = margin(0.75,0.5,0.5,0.5, "lines")

))

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions