Closed Suirotras closed 1 year ago
This is because the color
of geom_boxplot
in geom_fruit
was used in the internal. You can use aesthetics='colour_new_new'
in the scale_color_manual
to do it.
p2 <- p1 +
scale_color_manual(aesthetics='colour_new_new', values = MetBrewer::met.brewer("Cross")) +
scale_fill_manual(values = MetBrewer::met.brewer("Cross"))
Thanks for the reply and the nice solution. That worked!
And thank you for developing this package, which has been immensely helpfull in my visualizations
I might have found a bug in the ggtree and ggtreeextra relating to the use of geom_fruit(). I found that using geom_fruit with geom = geom_boxplot makes the plot unresponsive to scale_color_manual. I have put a simple example in this post.
Using geom_fruit without geom_boxplot appears to be no problem, as the the above code produces the following:![image](https://user-images.githubusercontent.com/91290224/204306223-4256fa93-af79-40d9-bf9a-2df64a028363.png)
However,
scale_color_manual
does not change the color values anymore when using geom_boxplot with geom = geom_boxplot, as it produces the following plot.Maybe it is a local problem on my computer, but I thought I it would still be useful to post it here.
A temporary workaround I used was to change the standard ggplot color values:
Here is the output of sessioninfo for the specific version information.