Do you think that long ENSEMBL GENE ID in your legend is annoying? Move it out of the way!
You can use theme()
to modify many things in ggplots such as the legends.
For example try this:
plotReducedDim(object = sce, dimred="umap", colour_by=gene_id) + labs(title = gene_name) + theme(legend.title = element_blank(), legend.position="top")
-
Add the gene name as the title of the plot:
+ labs(title = gene_name)
[see 1. Gene ID <---> Gene SYMBOL & 2. Add gene SYMBOL to your plots for instructions] -
Remove the looooooooong ENSMEBL ID as the legend title:
+ theme(legend.title = element_blank())
-
Move the legend to the top under the new
gene_name
title:
+ theme(legend.position="top")