I want to vizualize my data as a barplot and I have this two codes. First is working fine but when I tried to add last line of code in the second code (ylim argument) Rstudio send me this message "Scale for 'y' is already present. Adding another scale for 'y', which will replace the existing scale." Is somehow possible to add breaks and limit the Y axis in one argument?
ggplot(df, aes(x=rok, y=pocetimigrantu)) + geom_bar(stat="identity")+
scale_x_continuous(breaks=seq(1991,2014,1))+
scale_y_continuous(breaks=seq(0,1500000,100000))+
xlab('rok')+
ylab("celkový počet imigrantů")
ggplot(df, aes(x=rok, y=pocetimigrantu)) + geom_bar(stat="identity")+
scale_x_continuous(breaks=seq(1991,2014,1))+
scale_y_continuous(breaks=seq(500000,1500000,50000))+
xlab('rok')+
ylab("celkový počet imigrantů")+
ylim(500000, 1500000)