Hello,
I'm trying to change the x and y axis in R. My dataset contains monthly departures and arrivals from the Airports of Hong Kong and Singapore. On the Y axis, i'd like the passenger numbers to go from 4500000 to 7000000 by 500000. On the x axis i'd like to have all months, from january 2017 to december 2019. This is what i have so far.
HONGKONG$S = ifelse(HONGKONG$City == "HongKong", 0, 1)
HONGKONG$did = HONGKONG$P * HONGKONG$S
city1<-HONGKONG$City==as.character("HongKong")
city2<-HONGKONG$City==as.character("Singapur")
plot(HONGKONG$Datum[city1],HONGKONG$Passengers[city1],
type="l",col="red",xlab="Zeitraum",
xlim=as.Date(c("2017-01-31", "2019-12-31")),
ylim=c(4500000,7000000), ylab="Anzahl Fluggäste")
lines(HONGKONG$Datum[city2],HONGKONG$Passengers[city2],col="blue")
I've tried different options based on a last post but it doesn't work.
thank you!!