Closed paulklemm closed 2 years ago
yes, use ggplot2.
e.g.
require(DOSE)
require(enrichplot)
require(viridis)
data(geneList)
x = enrichDO(names(geneList)[1:100])
dotplot(x) + scale_color_viridis()
If you have any bettor color scale scheme, don't hesitate to let me know. I may change the default color scale if I agree with you. :)
I have a couple of suggestions.
I would strongly argue against using a diverging color scale sequential ranges. For example, the diverging color scale for the emaplot
shows three colors whereas it should be a gradient between two colors.
I would change it to the default colors of scale_color_gradient
.
Edit: If showing the p value we should actually reverse the scale since we want to highlight the small values: scale_color_gradient(low = "#56B1F7", high = "#132B43")
scale_color_gradient
for sequential scalesCurrently for the dotplot
actually shows a sequential scale for the sequential p-value (which is also mapped in emaplot
to color so however you decide, you should keep the color consistent) from red to blue. I would keep scale_color_gradient
because it's easier to understand since it doesn't mix colors.
You currently use a sequential color scale from green → red for the cnetplot
. I would change it to a diverging color scale since fold change is on a diverging scale. I would suggest blue → black → red. Green → black → red is not recommended since it cannot be distinguished with the most common type of color blindness.
If you want to I can make a pull request with reworked color scales.
PR is welcome @paulklemm .
Hi, I am getting this error for enrichmap, ReactomePA and clusterProfiler
Error : object 'scale_type' is not exported by 'namespace:ggplot2' ERROR: lazy loading failed for package 'enrichplot'
> scale_type
function (x)
UseMethod("scale_type")
<bytecode: 0x7ff3d45d3968>
<environment: namespace:ggplot2>
pls check your installation.
I want to increase the size of the text of the emapplot object. I know that with geom_node_text function I can edit the text. However, I am unable to remove the original text that comes with the emapplot function. Any advice will be highly helpful:)
Setting scale_color_viridis for dotplot() works fine but seems to be ignored for heatplot. it is really difficult to distinguish slightly up- and downregulated genes using the default color scheme :(
Having the same issue as @sparsepix : heatplot is not affected by _scale_colorviridis and other _scalecolor functions. Here is a minimum working example (notice that the two graphs look identical even though they should not):
library(DOSE)
library(enrichplot)
library(ggplot2)
data(geneList)
de <- names(geneList)[abs(geneList) > 2]
edo <- enrichDGN(de)
edox <- setReadable(edo, 'org.Hs.eg.db', 'ENTREZID')
p1 <- heatplot(edox, foldChange=geneList)
p2 <- heatplot(edox, foldChange=geneList) + viridis::scale_color_viridis()
cowplot::plot_grid(p1, p2, ncol=1, labels=LETTERS[1:2])
@sparsepix You should use viridis::scale_fill_viridis
p2 <- heatplot(edox, foldChange=geneList) + viridis::scale_fill_viridis()
Awesome package so far, I really like it.
I do not fancy the default color scales though. Can you make them customizable?