Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend in FeaturePlot_scCustom #94

Closed
bio-visualisation opened this issue Mar 11, 2023 · 2 comments
Closed

Legend in FeaturePlot_scCustom #94

bio-visualisation opened this issue Mar 11, 2023 · 2 comments

Comments

@bio-visualisation
Copy link

@samuel-marsh
Hi, is there any way to restrict to one legend for all split FeaturePlot_scCustom. Since all the scales are same I want to keep only one legend.
pal <- viridis(n = 10, option = "D") FeaturePlot_scCustom(cortex, features = c("Hes1"), colors_use = pal, split.by = 'orig.ident', num_columns = 4, combine = TRUE) & NoAxes()

@samuel-marsh
Copy link
Owner

Hi @bio-visualisation,

Apologies for the delay getting back to you. I have just implemented an new parameter in the development branch (v1.1.1.9006) called split_collect. It will only function if plotting a single feature as things get messy if plotting more than one feature and changing number of columns (hence need for legends on every plot).

  • The new default will automatically set split_collect = TRUE if split.by is not NULL and only a single feature is provided.
  • If more than one feature is provided it will automatically set split_collect = FALSE
  • The return legends to each plot when splitting and plotting a single feature simply manually provide split_collect = FALSE.

image

If you run into any issues let me know here and I'll reopen the issue.

Best,
Sam

@bio-visualisation
Copy link
Author

Awesome. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants