Dates instead of number of hours on the X-axis?

Ive tried to add dates instead of number of hours on the X-axis on this plot, which represents daily prices at different hours throughout the period of a month.

elspot_prices_2021_hourly_eur <- read_excel("elspot-prices_2021_hourly_eur.xlsx")
elspot_prices_2021_daily_eur <- read_excel("elspot-prices_2021_daily_eur.xlsx")

#Seasonaity of same hour
elspot <- as.double(elspot_prices_2021_hourly_eur$...9[-1]) #DK1 is row 9 
plot((24*(1:31) - 21), elspot[(24*(1:31) - 21)], col="deepskyblue", 
     ylim=c(9, 120), xlab="Hour", ylab="Price in Eur/h", 
     main="Seasonality of hourly prices in January 2021")
lines((24*(1:31) - 21), elspot[(24*(1:31) - 21)], col="deepskyblue")
points((24*(1:31) - 6), elspot[(24*(1:31) - 6)], col="lightcoral")
lines((24*(1:31) - 6), elspot[(24*(1:31) - 6)], col="lightcoral")
legend("topleft", legend=c("3AM", "6AM"), col=6:3, pch=19, bty="n")

The best I could come up with is

date_daily <- as.Date(elspot_prices_2021_daily_eur$`Elspot Prices in EUR/MWh`, 
                      format="%m/%d/%y %H")[-1]
hours <- c("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12",
           "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24")
date_hourly <- paste(hours[(0:8759) %% 24 + 1], date_daily[(0:8759) %/% 24 + 1])
date_hourly <- as_datetime(date_hourly, format="%H %Y-%m-%d")

But without luck

What the plot currently looks like

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum