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

How to change the color when using plot_dimred? #128

Open
CromitDolores0808 opened this issue Mar 30, 2022 · 1 comment
Open

How to change the color when using plot_dimred? #128

CromitDolores0808 opened this issue Mar 30, 2022 · 1 comment

Comments

@CromitDolores0808
Copy link

CromitDolores0808 commented Mar 30, 2022

Hi! I would like to change the group color in plot_dimred, but it doesn't work. Can you help me? Here is my code:

plot_dimred(
model, alpha_cells=0.4,color_cells = "grouping",
expression_source = dataset$expression,
groups=c("Liver invasion" = "red","Adjacent liver" ="#E5E4E2","Localized tumor"= "#E5E4E2","Adjacent GB"="#E5E4E2","Blood"="#E5E4E2"),
grouping = dataset$grouping
)

Thank you very much!

@Bio-data-tricks
Copy link

Hi,

Something like this:

your_colors <- c('#DEEBF7','#E5F5E0')
plot_dimred(trajectory,grouping = trajectory$grouping)+ scale_color_manual(values=your_colors)

Nicolas

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