I'm trying to fix a issue with the colour of the lines in a timeseries, but I can't change it and I don't find the problem.
graf2 <- ggplot(graf) +
aes(x = Periodo, y = value, color = variable) +
geom_line(lwd = 1) +
scale_color_manual(name = "",
limits = c("Índice precio de las exportaciones",
"Índice precio de las importaciones",
"Índice precio de las materias primas",
"Índide términos de intercambio")) +
scale_x_date(name = "Año", breaks = seq.Date(min(graf$Periodo),
max(graf$Periodo),
by = "1 year"),
date_labels = "%Y") +
scale_y_continuous("Valores índices") +
theme(panel.background = element_rect(fill = "transparent"),
panel.grid.major = element_line(color = "lightgray",
size = 0.05),
legend.position = "bottom")
And the return is everything fine, except for the colour of the lines