satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.18k stars 891 forks source link

SpatialPlots are taking ages to calculate #9042

Closed TdzBAS closed 1 week ago

TdzBAS commented 1 week ago

HI,

I am working with stereo-seq data, for which I created a spatial object to read in the input data. However, plotting the spatial plots takes ages. I use SpatialDimPlot and SpatialFeaturePlot with default parameters, but the image is huge. Is there a way to rasterize the plot or do something else to generate the plot instantly? Currently, I am waiting almost 5 minutes for one plot.

Best, T

zskylarli commented 1 week ago

Hi - in general, these plots do take a longer time to show in the RStudio viewer, and is due to the inherently denser nature of the spatial data; however, I've personally found that it could be marginally faster to immediately save them using ggsave() from ggplot and viewing it within your saved files instead. Please feel free to reopen if you experience any further issues, or if you suspect there is a bug in working with your object.