monocle2轨迹图更改点颜色
display.brewer.all()
cols_1<-brewer.pal(8, 'Dark2')
p<-plot_cell_trajectory(cds, color_by = 'celltype')+
scale_colour_manual(
values = cols_1
# aesthetics = c("colour", "fill")
)
monocle3轨迹图更改点颜色
for(gene in genes){
print(gene)
# png(file = paste0(gene, '.png'), width = 10, height = 8)
p<-plot_cells(cds, genes = gene, label_cell_groups=FALSE,
show_trajectory_graph=FALSE,
cell_size=1) + scale_color_gradient2(low='grey', mid = 'orange', high = 'red')
# dev.off()
ggsave(p, filename = paste0(gene,'.pdf'), width = 10, height = 8)
}