mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 18:57:25 +01:00
plots: Show percentiles on hover in rankings
This commit is contained in:
parent
fa49a5a887
commit
0087f83247
1 changed files with 8 additions and 1 deletions
|
|
@ -123,8 +123,15 @@ plot_rankings <- function(rankings, gene_sets) {
|
||||||
data = gene_set_data[gene %chin% gene_set],
|
data = gene_set_data[gene %chin% gene_set],
|
||||||
x = ranking_name,
|
x = ranking_name,
|
||||||
y = ~score,
|
y = ~score,
|
||||||
text = ~name,
|
|
||||||
color = gene_set_name,
|
color = gene_set_name,
|
||||||
|
text = ~name,
|
||||||
|
customdata = ~percentile,
|
||||||
|
hovertemplate = paste0(
|
||||||
|
"<b>%{text}</b><br>",
|
||||||
|
"Score: %{y:.3}<br>",
|
||||||
|
"Percentile: %{customdata:.2%}",
|
||||||
|
"<extra></extra>"
|
||||||
|
),
|
||||||
showlegend = is_first,
|
showlegend = is_first,
|
||||||
marker = list(size = 20, opacity = 0.66)
|
marker = list(size = 20, opacity = 0.66)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue