首页 > 解决方案 > 如何按降序排列这个 ggplot2 图?

问题描述

ggplot(data = ames) +
  geom_bar(mapping = aes(x = as.factor(Neighborhood),
                         y = Gr.Liv.Area,),
                         stat = "Summary",
                         fun = "mean" ,
                         fill = "sky blue") +
  labs(title = "Overall Quality by Average Sales Price",
       x ="Neighbourhood",
       y = "Avergage living area (SqFt)") +
  theme(axis.text.x = element_text(angle = 90, size = 8), 
        legend.position = "none") 

标签: rggplot2graph

解决方案


推荐阅读