Commit bf852fdc authored by Philippe BORDRON's avatar Philippe BORDRON
Browse files

Update interactive pca

parent d15ff486
......@@ -78,9 +78,11 @@ acp2d<-function(pca, comp=1:2, group=NULL, plotVars = FALSE, pointSize=2, plotTe
legend.text = element_text(size = legend_text_size) # manage legend text size according to number of conditions
)
graph <- graph + theme
graph <- graph + guides(col = guide_legend(
graph <- graph + guides(col = guide_legend_interactive(
ncol = ifelse(ngroup == 0, NULL, ceiling(ngroup/24)), # limit the number of columns to keep the plot large enough; maybe take legend_text_size
override.aes = list(size=legend_text_size/(2*pointSize)) # adjust dot size into legend
keywidth=unit(round(legend_text_size/(2*pointSize)) + 8, "points"), # adjust dot box size into legend for ggiraph
keyheight=unit(round(legend_text_size/(2*pointSize)) + 8, "points"), # ggiraph do not use point as std unit
override.aes = list(size=legend_text_size/(2*pointSize)) # adjust dot size into legend
))
graph <- graph + functPlot(size=pointSize, tooltip = rownames(d)) +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment