Place Annotation at Center of Plot with ggplot2

前端 未结 1 1139
予麋鹿
予麋鹿 2021-01-19 06:57

I\'d like to place an annotation at the center of a several ggplot objects.

I\'ve researched and found a few similar questions such as here: Relative positioning of

1条回答
  •  清酒与你
    2021-01-19 07:27

    library(grid) # for textGrob
    
    qplot(1,1) +
        annotation_custom(grid::textGrob("there"), 
                          xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf) 
    

    enter image description here

    0 讨论(0)
提交回复
热议问题