Seurat Dimplot, Vlnplot畫圖時報錯,Error in setup_panel_guides(..., self = self) : unused argument (list(~features.plot, ~id))

何帅發表於2024-04-10

Seurat Dimplot, Vlnplot畫圖時報錯,Error in setup_panel_guides(..., self = self) : unused argument (list(~features.plot, ~id))

pdf(paste0("EBV_GaC", "_Marker_genes_Vln.png"), width = 30, height = 10)
> DotPlot(object = subset_cells, features = c("PTPRC", "CD3D", "CD3E", "MS4A1", "COL1A1", "VWF", "EPCAM", "KRT18", "KRT19", "SDC1", "JCHAIN", "CLEC9A", "CLEC10A", "CD14", "CD68", "C1QC", "C1QA", "HBB"),, cols = c(low, high), scale = F) +
+ scale_y_discrete(limits=rev) +
+ theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
Error in setup_panel_guides(..., self = self) :
unused argument (list(~features.plot, ~id))

原因:ggplot2 版本過高造成的

解決方法:降低ggplot2 版本到3.5.0以下 (如:3.4.3)

相關文章