Recolouring treeplot

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r

Research direction

Start by reading the treeplot implementation and how it constructs the dendrogram, labels, and ggplot layers. Reproduce the supplied treeplot(gsetree, hclust_method = "complete") call, then determine whether these aesthetics are exposed or require an API change. Done means a documented way to customize the requested colours and appearance.

Written by the indexing model from the issue text.

Description

Hi!
Really nice package, thank you! I am trying to modify the colouring for treeplot. I was able to modify the code for gseaplot2 pretty easily by changing the function code, but doing this for treeplot returned:

function (x, ...) 
standardGeneric("treeplot")
... etc

I then tried simply tagging on ggcode to the plotting call, which worked to change the cluster block colours (via fill), and the dot point colours using colour, but this still leaves the dendogram and labels the previous and unwanted colours;

gsetreeplot <- treeplot(gsetree, hclust_method = "complete") + 
    scale_fill_manual(values = c("#006600",
                                 "#300000",
                                 "#ff9900",
                                 "red",
                                 "#1d3e59")) +
     scale_colour_gradient(low = "#000000",
                           high = "#ffffff",
                           guide = "p Value")

image

How can I change these aesthetics? And moreover, how would I go about further modifying the appearance of this plot (line widths, dot borders, etc), like I was able to do by modifying the gseaplot2 function code?

Thanks again,
Dan

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.