Hi Community
I am wondering how I can edit the Legend in a DoHeatmap which is a feature in Seurat. I want to get rid of the identity Legend but not the expression scale.
Is there a way of doing this?
Best Regards
Hi Community
I am wondering how I can edit the Legend in a DoHeatmap which is a feature in Seurat. I want to get rid of the identity Legend but not the expression scale.
Is there a way of doing this?
Best Regards
Hi,
Seurat
visualization is based (if not solely) in ggplot2
R
package. Thus, in order to address your question you need to look into ggplot2
documentation and syntax.
Since you didn't provide any code sample neither figure, I provide below a minimal reproducible code attempting to generate the figure that you're looking for.
# Packages
library("dplyr")
library("Seurat")
#library("SeuratData")
# Install, load data & run Seurat upstream workflow
SeuratData::InstallData("ifnb")
ifnb <- SeuratData::LoadData("ifnb")
ifnb <- ifnb %>%
NormalizeData(.) %>%
FindVariableFeatures(., selection.method = "vst", nfeatures = 2000) %>%
ScaleData(.)
# Plot heatmap
set.seed(123)
DoHeatmap(ifnb, features = VariableFeatures(ifnb)[1:100],
cells = sample(1:ncol(ifnb), 500), size = 4,
angle = 90) + guides(color="none")
The trick is done with guides(color="none")
. The result is the following plot:
I hope this helps,
António
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Thank you so much antonioggsousa ! That is exactly what I wanted.
Cheers Marvin