r - how to set the x axis in the origin order ggplot2 -
i have data frame total_likes
total_likes <- data.frame(month = c("june","july","august"), likes =c(24413,28839,35060))
i want plot month in x axis , likes in y axis. far have code:
ggplot(total_likes, aes(x = month, y = likes , group = 1)) + geom_point() + geom_line(size = 1.5, colour = "blue")
two questions axis questions:
why x axis not in order "june,july,august"? how can fix it?
is there way make y axis start 0 not 24000?
order data
total_likes <- data_frame(month = ordered(c("june","july","august"), month.name), likes =c(24413,28839,35060))
Comments
Post a Comment