clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

FeatureRequest: color category and gene labels differently in `cnetplot`

Open wbvguo opened this issue 1 week ago • 0 comments

Hi,

I was wondering if we could add a feature to color category and gene's label differently?

Currently only the node's color is supported (see example code from the package), the label's color is all black and I did not find an option to control it.

cnetplot.enrichResult(
  x,
  showCategory = 5,
  foldChange = NULL,
  layout = "kk",
  colorEdge = FALSE,
  circular = FALSE,
  node_label = "all",
  cex_category = 1,
  cex_gene = 1,
  cex_label_category = 1,
  cex_label_gene = 1,
  color_category = "#E5C494",
  color_gene = "#B3B3B3",
  shadowtext = "all",
  color.params = list(foldChange = NULL, edge = FALSE, category = "#E5C494", gene =
    "#B3B3B3"),
  cex.params = list(category_node = 1, gene_node = 1, category_label = 1, gene_label = 1),
  hilight.params = list(category = NULL, alpha_hilight = 1, alpha_no_hilight = 0.3),
  ...
)

example image image

Thanks

wbvguo avatar Jun 28 '24 15:06 wbvguo