dynverse / dyno

Inferring, interpreting and visualising trajectories using a streamlined set of packages 🦕
https://dynverse.github.io/dyno
Other
170 stars 32 forks source link

How to change the color when using plot_dimred? #128

Open CromitDolores0808 opened 2 years ago

CromitDolores0808 commented 2 years ago

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 commented 2 years ago

Hi,

Something like this:

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

Nicolas