How can I change the width of each coloum in the heatmap in the treeplot?

Open
#274 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r

Research direction

Start with the treeplot call, especially clusterPanel.params and offset.params, and inspect how the heatmap panel sizes columns as their count grows. Reproduce the overlap with the supplied example, then verify that a documented width control or clarified setting keeps column labels readable and the spacing between the heatmap and enriched terms reasonable.

Written by the indexing model from the issue text.

Description

image
When there are many columns, colnames overlap easily.
And it seems that as there are more and more coloum, the width gets smaller and smaller, and all the columns are squeezed together.
As a result, the parameter setting of tiplab = rel(1) is not very reasonable. When there are few columns, the heatmap may overpower the enriched terms, and when there are many columns, the distance between the heatmap and the enriched terms will be very empty.
BP mergedgotree

This is the code for my drawing
p3 <- treeplot(merged, showCategory = 10, hilight.params = list(hilight = TRUE, align = "both"), offset.params = list(bar_tree = rel(1), tiplab = rel(1), extend = 0.3, hexpand = 0.1), cluster.params = list(method = "ward.D", n = 7, color = NULL, label_words_n = 4, label_format = 30), clusterPanel.params = list(clusterPanel = "heatMap")

Look forward to your reply! Thanks a lot!

Dominant language
R
Stars
260
Forks
75
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from YuLab-SMU/enrichplot

All issues in YuLab-SMU/enrichplot

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.