library(readxl) d <- read_excel("/Users/lwhatford/Desktop/datap.xlsx") d$`Emerging theme`<- factor(d$`Emerging theme`,levels=c("Demand/market effects","Value chain","Trade","Labour & Livelihoods","Mitigation and interventions","Coping","Epidemiological factors","Animal Welfare")) n<-ggplot(d,aes(x=Country, y=Value, fill=`Emerging theme`))+geom_bar(stat="identity", position = "stack") n2<-n+coord_flip()+theme_classic() n2 n3<-n2+scale_fill_manual(values = c("#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666")) n4<-n3+ylab("Number of articles") png("fig3.png",type="cairo",units="in",width=10,height=5,res=300) plot(n4) dev.off()