plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

geom_density_ridges with plotly

Open aniskara opened this issue 2 years ago • 0 comments

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

aniskara avatar Dec 06 '23 16:12 aniskara