Skip to content

Commit

Permalink
Update 图3-1-1_柱形图系列.R
Browse files Browse the repository at this point in the history
  • Loading branch information
EasyChart authored Jun 3, 2019
1 parent 5b3ea3e commit 819e274
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 第3章_类别比较型图表/图3-1-1_柱形图系列.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

#EasyCharts团队出品,如有商用必究,
#如需使用与深入学习,请联系微信:EasyCharts
#EasyCharts团队出品,
#如有问题修正与深入学习,可联系微信:EasyCharts

library(ggplot2)
library(RColorBrewer)

#---------------------------单数剧系列柱形图----------------------------------------------------
#---------------------------单数剧系列柱形图----------------------------------------------------
mydata<-data.frame(Cut=c("Fair","Good","Very Good","Premium","Ideal"),
Price=c(4300,3800,3950,4700,3500))

Expand All @@ -21,7 +21,7 @@ ggplot(data=mydata,aes(x=Cut,y=Price))+
)


#---------------------------双数剧系列柱形图----------------------------------------------------
#---------------------------双数剧系列柱形图----------------------------------------------------
library(reshape2)
mydata<-read.csv("MultiColumn_Data.csv",check.names=FALSE,
sep=",",na.strings="NA",
Expand All @@ -43,7 +43,7 @@ ggplot(data=mydata,aes(Catergory,value,fill=variable))+
)


#-------------------------------堆积柱形图-------------------------------------------------------
#-------------------------------堆积柱形图-------------------------------------------------------
mydata<-read.csv("StackedColumn_Data.csv",sep=",",na.strings="NA",stringsAsFactors=FALSE)


Expand All @@ -61,7 +61,7 @@ ggplot(data=mydata,aes(variable,value,fill=Clarity))+
legend.position = c(0.85,0.82)
)

#------------------------------百分比堆积柱形图-------------------------------------------------------
#------------------------------百分比堆积柱形图-------------------------------------------------------

mydata<-read.csv("StackedColumn_Data.csv",sep=",",na.strings="NA",stringsAsFactors=FALSE)

Expand Down

0 comments on commit 819e274

Please sign in to comment.