Closed bapoorva closed 6 years ago
When overlay = TRUE
, the individual plots in the plot list returned from FeaturePlot aren't named. However, you can still access them using the standard list [[
subset operator.
plot.list <- FeaturePlot(object = scrna, features.plot = c('nUMI', feature2), do.return = TRUE, ...) # Fill in 'feature2' and '...' with your own second feature and other arguments, respectively
plot <- plot.list[[1]] # Use the standard list `[[` subset operator to get the plot, this has the advantage of being portable and non-reliant on plot names
Perfect. That worked. Thank you
Hi,
I'm creating a Shiny website for easy visualization of single set data analyzed using seurat pipeline. I am, however, having trouble displaying the plots. I dug a little deeper and it so happens that Vlnplot and Featureplot return a list despite giving
do.return ==T
. With feature plot, you can subselect like thiswhere plot is now a ggplot object which can be used within shiny renderPlot. How can I do the same for a violin plot or say a Featureplot with 2 genes overlaid using the
overlay=TRUE
option ?Thanks