library(ggplot2)
## Registered S3 methods overwritten by 'ggplot2':
## method from
## [.quosures rlang
## c.quosures rlang
## print.quosures rlang
library(ggthemes)
library(gridExtra)
Country=c("Vietnam", "Thailand", "Malaysia", "Indonesia", "Singapore")
Publications=c(17178, 42914, 71229, 19585, 69883)
dat= data.frame(Country, Publications)
dat
## Country Publications
## 1 Vietnam 17178
## 2 Thailand 42914
## 3 Malaysia 71229
## 4 Indonesia 19585
## 5 Singapore 69883
#ve bieu do cot
library(ggplot2)
p=ggplot(data=dat, aes(x=Country, y=Publications, fill=Country, col=Country))
p=p+geom_bar(stat="identity")
p

#ve bieu do cot, bo phan ghi chu ben canh
p=ggplot(data=dat, aes(x=Country, y=Publications, fill= Country, col= Country))
p=p+geom_bar(stat="identity")+theme(legend.position="none")
p

#ve bieu do cot, bo phan ghi chu, doi theme
p=ggplot(data=dat, aes(x=reorder(Country, Publications), y=Publications, fill= Country, col= Country))
p=p+geom_bar(stat="identity")+ theme(legend.position="none")+ theme_bw()
p

#ve bieu do cot, bo phan ghi chu, doi theme, doi ten hang
p=ggplot(data=dat, aes(x=reorder(Country, Publications), y=Publications, fill= Country, col= Country))
p=p+geom_bar(stat="identity")+theme(legend.position="none")+theme_bw()+xlab("Country")
p

#ve bieu do cot, bo phan ghi chu, doi theme, doi ten hang, dien gia tri
p=ggplot(data=dat, aes(x=reorder(Country, Publications), y=Publications, fill= Country, label=Publications))
p=p+geom_bar(stat="identity")+geom_text(size=3, color="white", position = position_stack(vjust=0.5))
p=p+theme_bw()+theme(legend.position = "none")+xlab("Country")
p
