Thx for the quick answer. Sadly that does not work I will send more of the code:
#Sequenz für X-Achse:
AltersgruppenAllbus<- seq(20,70,5)
#Combine der Durschnittswerte:
DFPTimAltersDurchschnitt <- c(Allbus20mean,Allbus25mean,Allbus30mean,
Allbus35mean,Allbus40mean,Allbus45mean,
Allbus50mean,Allbus55mean,Allbus60mean,
Allbus65mean,Allbus70plusmean)
#Zusammenführung in neuen DataFrame:
AllbusFinal <- data.frame(AltersgruppenAllbus,DFPTimAltersDurchschnitt)
AllbusFinalMelt <- melt(AllbusFinal, id='AltersgruppenAllbus')
#Erstellung der Plots:
ggplot(AllbusFinalMelt,aes(AltersgruppenAllbus,DFPTimAltersDurchschnitt
))+
geom_line()+
ylim(0,1600)+
ylab('Einkommen pro Kopf im Haushalt pro Monat in €')+
ggtitle("Einkommen pro Kopf im Haushalt pro Monat
in den Altersgruppen aus vereinfachten Allbus-Auswahl")+
geom_hline(yintercept=1257)+geom_vline(xintercept = 55)+
scale_x_continuous(breaks = 1:11,labels = c('20-25 Jahre',
'25-29 Jahre',
'30-34 Jahre',
'35-39 Jahre',
'40-44 Jahre',
'45-49 Jahre',
'50-54 Jahre',
'55-59 Jahre',
'60-64 Jahre',
'65-69 Jahre',
'70 Jahre und älter'))+
theme(axis.text.x = element_text(angle = 90, vjust = 1, hjust=1))
It also does not show any error. That is what the output looks like.
Sincerely Simon