Я делаю двухцветную фигуру из таблицы данных, состоящей из строк из 0 и 1, например:
mem/Bur_05_sorted.bam_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Bur_05_sorted.bam_B 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Ell_06_sorted.bam_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Ell_06_sorted.bam_B 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
mem/Ell_07_sorted.bam_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Ell_07_sorted.bam_B 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
mem/Ste_01_sorted.bam_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Ste_01_sorted.bam_B 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
mem/Sto_02_sorted.bam_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Sto_02_sorted.bam_B 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1
mem/Sto_03_sorted.bam_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mem/Sto_03_sorted.bam_B 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
mem/Sto_07_sorted.bam_A 0 0 0 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_sorted.bam_B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Используя этот код:
a<-read.table("L_1616.vit.txt",row.names=1)
rowlabs = c("Bur_05_A","Bur_05_B","Ell_06_A","Ell_06_B","Ell_07_A","Ell_07_B","Ste_01_A","Ste_01_B","Sto_02_A","Sto_02_B","Sto_03_A","Sto_03_B","Sto_07_A","Sto_07_B","Vog_01_A","Vog_01_B","Vog_02_A","Vog_02_B","Vog_03_A","Vog_03_B","Vog_04_A","Vog_04_B","Vog_05_A","Vog_05_B","Vog_06_A","Vog_06_B")
columnlabs = c(0:(ncol(a)-1))*0.25
x11()
par(mar=c(5,6,4,2)+.1)
image(t(as.matrix(a)),col=c("blue","red"),axes=F)
axis(1,at=seq(0,2,length.out=ncol(a)), labels=columnlabs,las=2)
axis(2,at=seq(1,0,length.out=nrow(a)), labels=rowlabs, las=1)
savePlot("./plots/L_1616.png","png")
В На рисунке отметки центрированы для каждого «блока».
Однако я бы хотел, чтобы отметки деления выровнялись по левому центру каждого «блока». Как это:
Как я могу этого добиться? Спасибо!