LieberInstitute / spatialLIBD

Code for the spatialLIBD R/Bioconductor package and shiny app
http://LieberInstitute.github.io/spatialLIBD/
78 stars 16 forks source link

Color Blending for NA values in `vis_clus` #43

Closed boyiguo1 closed 11 months ago

boyiguo1 commented 1 year ago

If I understand correctly, the color blending for NA values are not implemented in vis_clus yet.

https://github.com/LieberInstitute/spatialLIBD/blob/bceb64dbe3ac6abbb39ce5e9233b7d4b978ce334/R/vis_clus_p.R#L115

Referencing to vis_gene, I think the implementation for vis_clus should be fairly easy, by adding na.value = "#CCCCCC40" to scale_fill_manual function

boyiguo1 commented 1 year ago

Also, currently, there is no way to change the fill value for NA in clustervar from the default dark grey to anything else using the colors argument, unless to manually create a level for NA in clustervar

lcolladotor commented 11 months ago

Yes, that's true that you would need to some workarounds to control the color of NA values.

lcolladotor commented 11 months ago

@boyiguo1, version 1.13.6 now implements the na_color option on vis_clus_p(), vis_clus(), and vis_grid_clus().