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")  

with output : enter image description here

two questions axis questions:

  1. why x axis not in order "june,july,august"? how can fix it?

  2. 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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -