diff --git a/R/plots.R b/R/plots.R index 72ff486..cd15add 100644 --- a/R/plots.R +++ b/R/plots.R @@ -123,8 +123,15 @@ plot_rankings <- function(rankings, gene_sets) { data = gene_set_data[gene %chin% gene_set], x = ranking_name, y = ~score, - text = ~name, color = gene_set_name, + text = ~name, + customdata = ~percentile, + hovertemplate = paste0( + "%{text}
", + "Score: %{y:.3}
", + "Percentile: %{customdata:.2%}", + "" + ), showlegend = is_first, marker = list(size = 20, opacity = 0.66) )