I've tried finding an answer but nothing seems to work. The first image below is a scatterplot drawn in ggplot2, which has been post-processed by a specific LaTeX journal template on Overleaf. I would like to re-create the chart without having to use the template.
Unfortunately, I haven't been able to figure out how to draw the horizontal lines that separate the title area, and note area (respectively) from the main plot region (see red arrows.
How can I do this?
Oh, the second image is the one that is produced from the code below.
Thanks!
library(ggplot2)
theme_set(theme_bw()) # pre-set the bw theme.
data("midwest", package = "ggplot2")
# Scatterplot
gg <- ggplot(midwest, aes(x=area, y=poptotal)) +
geom_point(aes(col=state, size=popdensity)) +
geom_smooth(method="loess", se=F) +
xlim(c(0, 0.1)) +
ylim(c(0, 500000)) +
labs(y="Population",
x="Area",
title="Figure 4: Scatterplot",
caption = "Source: midwest") +
theme(plot.background = element_rect(colour="black",size=1))
plot(gg)


