Created
March 31, 2021 20:52
-
-
Save gkaramanis/b834127f3b77d62dc5ed16ecacc58e73 to your computer and use it in GitHub Desktop.
color behind title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(cowplot) | |
p <- ggplot(mtcars, aes(cyl, disp)) + | |
geom_point() + | |
labs(title = "But China and India") + | |
theme( | |
plot.background = element_rect(fill = "transparent") | |
) | |
ggdraw() + | |
draw_line(x = c(0.145, 0.195), y = c(0.97, 0.97), size = 8, color = "orange", lineend = "round") + | |
draw_line(x = c(0.287, 0.33), y = c(0.97, 0.97), size = 8, color = "darkslategray3", lineend = "round") + | |
draw_plot(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment