I have This ggplot2
I made up to satisfy these conditions:
- Remove default background that is hash colour to be plain.
- Make (a) to be the plot title located within the plot area that is not close to the line (automatically).
- Make $\phi = .8$ to be automatically at the head of the line (still within the plot area).
- And sd = 1 to be automatically at the tail of the line.
- The four(4) Borderlines to be present.
- Gridlines to be a grey colour.
.
## simulate ARIMA(1, 0, 0)
set.seed(799837)
ts <- arima.sim(n = 10, model = list(ar = 0.95, order = c(1, 0, 0)), sd = 10)
gplot <- ggplot(NULL, aes(y = ts, x = seq_along(ts)))
geom_line(color = "#F2AA4CFF")
geom_point(color = "#101820FF")
annotate("text", x = mean(seq_along(ts)), y = max(ts) * 1.1, label = "(a)")
annotate("text", x = min(seq_along(ts)), y = max(ts) * 1.1, label = 'paste(~phi~"=.8")', parse = TRUE )
annotate("text", x= max(seq_along(ts)), y = ts[[max(seq_along(ts))]] * 1.1, label = "sd=1")
xlab('Time')
ylab('Series')
theme_bw()
theme(axis.text = element_text(size = 40, angle = 0, vjust = 0.0, hjust = 0.0), #y-axis label size
axis.title = element_text(size = 40), #x-axis label size
axis.title.x = element_text(angle = 0, hjust = 0.5, vjust = 0.5, size = 40), # x-axis title
axis.title.y = element_text(angle = 90, hjust = 0.5, vjust = 0.5, size = 40), # y-axis title
plot.title = element_text(size = 40, margin = margin(t = 25, b = -20, l = 0, r = 0)),
panel.background = element_blank())
scale_x_continuous(breaks = seq(1,10,2))
scale_y_continuous(expand = c(0.0, 0.00))
gplot
I want the font of the plot title to increase. As you can see that despite setting the font of the plot title to 40 the font title refuse to increase. This question is a follow-up question from
You might also want to resize the other annotations.
annotate("text", x = mean(seq_along(ts)), y = max(ts) * 1.5, label = "(a)", size = 40)
annotate("text", x = min(seq_along(ts)), y = max(ts) * 1.5, label = 'paste(~phi~"=.8")', parse = TRUE, size = 10)
annotate("text", x= max(seq_along(ts)), y = ts[[max(seq_along(ts))]] * 1.5, label = "sd=1", size = 10)