enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

cnetplot font change for category or gene only

Open BioinformaNicks opened this issue 4 years ago • 2 comments

Hi,

I'm trying to use cnetplot to create networks of enricher results. For readability purposes, I would like to modify the category node/vertex labels separately from gene labels. Currently, the function itself only allows modification of label size, however, I would like to bold and change the font of the category labels. How would I best approach this?

Kind regards,

BioinformaNicks

BioinformaNicks avatar Jul 13 '21 08:07 BioinformaNicks

Nevermind, I found a workaround. For future reference for others: specificy node_label = 'gene' (or category, depends on what you want) and then add a geom_node_text using plot$data[1:n,3] as label and plot$data[1:n,] as data.

BioinformaNicks avatar Jul 13 '21 09:07 BioinformaNicks