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

geom_density_ridges with plotly #2322

Open
aniskara opened this issue Dec 6, 2023 · 0 comments
Open

geom_density_ridges with plotly #2322

aniskara opened this issue Dec 6, 2023 · 0 comments

Comments

@aniskara
Copy link

aniskara commented Dec 6, 2023

Hi,

I'm trying to work on density plot using geom_density_ridges, it works with ggplot but not with ggplotly. Do you have any suggestion for an alternative or an idea to resolve the issue ?

Thanks

code :

data_to_plot <- read.csv("density_data.csv")

plot <- ggplot(data_to_plot, aes(x = ncounts, y = celltype, fill = celltype, color = celltype)) +
geom_density_ridges(alpha = 0.3) +
facet_grid(gene ~ dataset + sample) +
theme_ridges() +
theme(panel.spacing = unit(.05, "lines"),
panel.border = element_rect(color = "black", fill = NA, size = 1),
strip.background = element_rect(color = "black", size = 1.2),
strip.text.x = element_text(margin = margin(0.4, 0.2, 0.4, 0.2, "cm"))) +
labs(y = NULL)
plot

ggplotly(plot)

Screenshot 2023-12-06 at 11 56 19 AM

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

1 participant