Reputation: 51
Im trying to get rid of the default main title (ass2_ts) that you can see on the top . Is there a away to suppress that ?
ass2_acf <- acf(ass2_ts,plot = FALSE)
par(oma=c(3,3,0,2))
plot(ass2_acf , adj=0.5)
title( "Egg deposition Time Series ACF",line=-1)
Many thanks
Upvotes: 3
Views: 1456
Reputation: 93811
You can set the plot title with the main
argument:
set.seed(2)
d = cumsum(rnorm(50))
acf(d, main="Egg deposition Time Series ACF")
If you want the title inside the plot area, you can get rid of the margin at the top as well. The mar
graphical parameter contains the margins, in number of lines, on each side of the plot in the order c(bottom, left, top, right)
. The default is c(5,4,4,2) + 0.1
. We want to get rid of the top margin in this case. The code below sets the top margin to 0.1 lines and leaves the others unchanged:
par(mar=c(5,4,0,2) + 0.1)
acf(d, adj=0.5)
title("Egg deposition Time Series ACF",line=-1)
Upvotes: 4