rggplot2

R ggseasonplot line width - how to change/control?


Reproducible example:

library(forecast)
library(ggplot2)

gas <- forecast::gas
gas <- window(gas, start=1990)
ggseasonplot(gas, year.labels = TRUE)

The lines are too thin to distinguish colours properly, so I would like to control the linewidth. I have tried "lwd", "linewidth" and "size" but the plot does not react to any of these. If someone could help please, it would be much appreciated. Thank you.


Solution

  • For the gg version, you can modify the linewidths by adding another geom:

    ggseasonplot(gas, year.labels = TRUE) +
      geom_line(linewidth=1)
    

    enter image description here