zzz123
看起来像是基因名称??
前面加了一行代码,改了一下features的等号右边。
gene <- "Nhsl1" #可以在这里替换名称
pdf("Nhsl1.pdf",width = 12,height = 2) #这里也要手动改,不想手动改就得用paste( )函数
VlnPlot(CR, features = gene, slot = "counts", log = TRUE,cols = my36colors,pt.size = 0,adjust = 1)+NoLegend()
dev.off()
如果要让它自动从一列基因名里面挨个儿代入、绘图,就要用for循环了