0

I wish to increase the size of the font of the words "data" "seasonal" "trend" and remainder in the stl function in R.

I have modified a bunch of parameters using the set.pars argument with the plot function but changing cex and cex.sub and cex.labs has no impact on these 4 labels.

Is there an alternative way to modify them?

Below is my code for the seasonal decomposition plot and here is a link to a dput of my LX0088U09A3.stl variable for a reproducible example:

LX0088U09A3ts <- ts(as.numeric(LX0088_Raw$LX0088U09A3), frequency = 96)
LX0088U09A3.stl <- stl(LX0088U09A3ts, s.window = "periodic", robust = TRUE)
plot(LX0088U09A3.stl, 
     main = "Seasonal Decompostion for LX0088U09A3",
     col.range = "red",
     set.pars = list(cex.axis = 2,
                     cex.lab = 2, 
                     cex.main = 2, 
                     mar = c(0, 6, 0, 6), 
                     oma = c(6, 0, 4, 0), 
                     tck = -0.02,
                     lwd=2, 
                     mfrow = c(4,1)))
i.n.n.m
  • 2,936
  • 7
  • 27
  • 51
TheGoat
  • 2,587
  • 3
  • 25
  • 58
  • Have you tried changing `cex`? The other parameters (`cex.main` etc) you have listed are sizes relative to `cex`, so you might need to change that first. – Andrew Gustar Aug 14 '17 at 21:57
  • @AndrewGustar, thanks for the info, I wasn't aware the other parameters were relative to cex. I tried by setting cex = 10 and the others to 1 and this made no difference – TheGoat Aug 14 '17 at 22:03
  • It was worth a try! Can you give a reproducible example? It might be something to do with the `plot` method for the stl object. – Andrew Gustar Aug 14 '17 at 22:09
  • just added dput to my variable in the original post – TheGoat Aug 14 '17 at 22:15
  • Using the example in the `stl` documentation `plot(stl(nottem, "per"))`, and adding a title and your parameters, I can get `cex.axis` and `cex.main` to affect the axis scale text and chart title, but neither `cex` nor `cex.lab` seem to have any effect at all. – Andrew Gustar Aug 14 '17 at 22:41
  • That's what I am seeing too! – TheGoat Aug 14 '17 at 22:52
  • 1
    Those labels seem to be hard-coded into `plot.stl`, so perhaps they can't be changed at all. You could have a look at the `ggseas` package, which I think does something similar, and might offer more flexibility. – Andrew Gustar Aug 15 '17 at 05:56

0 Answers0