Rstudio,R语言
先保存向量类型的数据
> type<-c("mini","air","standard","pro")
> price<-c(2899,3888,2498,4388)
> sales_Volume<-c(6482,4357,4683,6743)
> statistic_ipad<-data.frame(type,price,sales_Volume)
保存后可点击查看数据
然后绘制图表 x横坐标是类型type,销量为条形图,价格为散点图,
> ggplot(statistic_ipad)+geom_bar(stat = "identity",aes(x=type,y=sales_Volume))+geom_point(aes(x=type,y=price))