How can i change the scales in x axis with ggplot2

Solution for How can i change the scales in x axis with ggplot2
is Given Below:

I need to make a plot and the x axis values are dates.

This is my code:

Tablas_Salariales <- read_excel("Tablas Salariales.xlsx", 
    sheet = "Hoja1", range = "A1:G20", col_types = c("date", 
        "numeric", "numeric", "numeric", 
        "numeric", "numeric", "numeric"))
Tablas_Salariales %>% 
  pivot_longer(-Fecha) %>% 
  ggplot(aes(x = Fecha, y = value, 
             colour = name, group = name)) +
  geom_line() +
  theme_classic(base_size = 17) +
  scale_y_continuous(labels = scales::dollar,
                     name = NULL, breaks=seq(0,135,15)) + 
 scale_x_date(breaks = date_breaks("1 year"),
             labels = date_format("%Y")) +
  scale_color_brewer(palette = "Set1",
                     name = NULL) +
  labs(x= NULL, y= NULL,
       title = "Salario de Docentes del Magisterio Venezolano",
       caption = "Fuente: MPPPE, BCV, Tipo de cambio paralelo, cálculos propios.",) +
  theme(plot.title = element_text(size = 14, face = "bold.italic"), 
        plot.caption = element_text(size = 11),
        plot.background = element_rect(fill = "grey69"),
        panel.background = element_rect(fill = "grey80"),
        legend.background = element_rect(fill="grey80"))

I need the x-axis to start in 2013 and end in 2020, with intervals of one year. I have tried in various ways (like scale_x_date) but it always gives me error. I don’t know what to do.
This is how the graph looks:

Plot

And this is my data:

structure(list(Fecha = structure(c(1380499200, 1383177600, 1409356800, 
1409529600, 1430438400, 1446336000, 1456790400, 1464739200, 1475280000, 
1485907200, 1496275200, 1506816000, 1514764800, 1519862400, 1535760000, 
1546300800, 1554076800, 1577836800, 1588291200), tzone = "UTC", class = c("POSIXct", 
"POSIXt")), `Docente VI` = c(124.01, 115.244114002478, 88.8149572119558, 
88.8736376389339, 30.7310447761194, 18.044993258427, 21.6452173913043, 
25.1663602941176, 18.1930721181147, 9.79285888970408, 5.61573170731707, 
1.22741201597177, 0.249722767560108, 10.0158412615385, 21.4682891449754, 
10.3915157785825, 13.366414733733, 6.55928133909935, 3.91966087186908
)), row.names = c(NA, -19L), class = c("tbl_df", "tbl", "data.frame"
))

And this is the error:

Error

Thanks 🙂

I did it 🙂

Tablas_Salariales <- read_excel("Tablas Salariales.xlsx", 
    sheet = "Hoja1", range = "A1:G20", col_types = c("date", 
        "numeric", "numeric", "numeric", 
        "numeric", "numeric", "numeric"))
colnames(Tablas_Salariales)[1] <- "Fecha"
Tablas_Salariales$Fecha = as.Date(Tablas_Salariales$Fecha, format = "%Y-%m-%d")
Tablas_Salariales %>% 
  pivot_longer(-Fecha) %>% 
  ggplot(aes(x = Fecha, y = value, 
             colour = name, group = name),
         xmin = as.Date("2013-09-30", "%Y-%m-%d"), 
    xmax = as.Date("2020-05-01",  "%Y-%m-%d")) +
  geom_line() +
  theme_classic(base_size = 17) +
  scale_y_continuous(labels = scales::dollar,
                     name = NULL, breaks=seq(0,135,15)) +
  scale_x_date(breaks = date_breaks("1 year"),
             labels = date_format("%Y")) +
  scale_color_brewer(palette = "Set1",
                     name = NULL) +
  labs(x= NULL, y= NULL,
       title = "Salario de Docentes del Magisterio Venezolano",
       caption = "Fuente: MPPPE, BCV, Tipo de cambio paralelo, cálculos propios.",) +
  theme(plot.title = element_text(size = 14, face = "bold.italic"), 
        plot.caption = element_text(size = 11),
        plot.background = element_rect(fill = "grey69"),
        panel.background = element_rect(fill = "grey80"),
        legend.background = element_rect(fill="grey80"))

But I need that the x-axis starts at 2013, how can I make that?

This is the plot

PLOT