hab schon mehrfach und mit eingien beispielen versucht, aber irgendwie bekomme ich sie nicht in meine Plots.
Kann vllt jemand kurz erläutern an welcher Stelle ich die Bezeichner definiere etc, oder einfach im Code einfügen? Liegt das Problem vllt daran das ich 2 geoms aus 2 versch. df nutze?
Hier ein konkreter Code von mir, wieder im Ursprungszustand.
Code: Alles auswählen
ggplot() +
theme_fivethirtyeight()+
theme(axis.title.y= element_text())+
geom_point(data=spotmarket, aes(x = date, y = price, ), color = "steelblue4", size=1) +
geom_line(data = average_price, aes(x = date, y = sma7d, ), color="orange", linewidth=1) +
labs(title = "Stündlicher Strompreis",x=NULL, y = "Cent / kWh") +
scale_y_continuous(labels = c(-15,0,15,30,45,60,75,90), breaks = c(-15,0,15,30,45,60,75,90))+
scale_x_date(date_labels = "%Y",
breaks = as.Date(c("2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-01-01", "2017-01-01", "2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01", "2022-01-01", "2023-01-01")))