Can't hide legend using autoplot

Hello,
I create a plot using autoplot.
The idea is to hide the legend frame.
The autoplot function makes them useless.
Here is the code:

library(seasonal)
library(tsibble)
set.seed(123)
datos <- ts(rnorm(480),start =1970,frequency = 12 )
ajuste <- seas(datos,x11="")
            
series(ajuste, series = c("d10","d11","d12","d13")) %>% 
as_tsibble()  %>% 
  mutate(
    key=recode(key,
      d10="Ajustada",
      d11="Regular",
      d12="Tendencia",
      d13="Irregular")) %>% 
  autoplot() +
  labs(x="Tiempo",y="Valores")+
  facet_wrap(~key)+
  theme_light()

I tried using

theme_light(legend.position="")

But It generated the same plot.
Maybe It is an autoplot related issue?
Thanks for your time and interest.
Have a nice day.

+ guides(col="none")

1 Like

Thank you very much, robhyndman.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.