library(ggplot2) soft <- read.csv("heatmap.switch.val", sep=";", header=T) soft_order <- c("Hapo-G", "NextPolish", "Racon", "HyPo", "ntEdit", "POLCA", "Pilon", "Uncorrected") soft$software <- factor(soft$software, levels = soft_order) ggplot(soft, aes(position, software, fill = as.factor(haplotype))) + geom_tile(stat="identity", width=20, height=.7, size=10) + scale_fill_manual(breaks=c(-1, 1), values = c("red", "blue"))+ theme_grey(base_size=10)+ labs(x="Position",y="",fill="", fontsize=18) + theme(legend.position = "none") + theme(text = element_text(size=18), axis.text.x = element_text(angle=90, hjust=1)) + theme(axis.text.x=element_text(size=18,colour="black"), axis.text.y=element_text(size=18, vjust=0.2,colour="black"), axis.ticks=element_line(size=0.4), plot.background=element_blank(), panel.border=element_blank(), plot.margin=margin(0.7,0.4,0.1,0.2,"cm")) ggsave("Figure4.png", width=16, height=9, dpi=300)