Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recolouring treeplot #250

Open
danphillips28 opened this issue Jul 30, 2023 · 1 comment
Open

Recolouring treeplot #250

danphillips28 opened this issue Jul 30, 2023 · 1 comment

Comments

@danphillips28
Copy link

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

@huerqiang
Copy link
Contributor

You can use the group_color parameter to change to colour:

group_color | A vector of group colors, the length of the vector should be the same as nCluster. Will be removed in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants