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

Dotplot() cannot change color #663

Closed
GuanKX99 opened this issue Feb 4, 2024 · 2 comments
Closed

Dotplot() cannot change color #663

GuanKX99 opened this issue Feb 4, 2024 · 2 comments

Comments

@GuanKX99
Copy link

GuanKX99 commented Feb 4, 2024

Hi members in Yulab!
I used Dotplot() to illustrate the result of GO, like this
1
We can see that the color is composed of red and blue. But maybe because I upgraded some packages, my color changed (picture in below), I want to revert this change, so I use p +scale_color_gradient(low="red",high = "blue"), but doing this does not Nothing changes, I'm wondering if there is any way to change the color?
2

`> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8

time zone: Asia/Shanghai
tzcode source: internal

attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base

other attached packages:
[1] enrichplot_1.22.0 clusterProfiler_4.10.0 ggplot2_3.4.4 org.At.tair.db_3.18.0
[5] AnnotationDbi_1.64.1 IRanges_2.36.0 S4Vectors_0.40.2 Biobase_2.62.0
[9] BiocGenerics_0.48.1

loaded via a namespace (and not attached):
[1] DBI_1.1.3 bitops_1.0-7 gson_0.1.0 shadowtext_0.1.2
[5] gridExtra_2.3 rlang_1.1.2 magrittr_2.0.3 DOSE_3.28.2
[9] compiler_4.3.2 RSQLite_2.3.4 png_0.1-8 vctrs_0.6.5
[13] reshape2_1.4.4 stringr_1.5.1 pkgconfig_2.0.3 crayon_1.5.2
[17] fastmap_1.1.1 XVector_0.42.0 labeling_0.4.3 ggraph_2.1.0
[21] utf8_1.2.4 HDO.db_0.99.1 purrr_1.0.2 bit_4.0.5
[25] xfun_0.41 zlibbioc_1.48.0 cachem_1.0.8 aplot_0.2.2
[29] jsonlite_1.8.8 GenomeInfoDb_1.38.4 blob_1.2.4 highr_0.10
[33] BiocParallel_1.36.0 tweenr_2.0.2 parallel_4.3.2 R6_2.5.1
[37] stringi_1.8.3 RColorBrewer_1.1-3 GOSemSim_2.28.0 knitr_1.45
[41] Rcpp_1.0.11 Matrix_1.6-1.1 splines_4.3.2 igraph_1.6.0
[45] tidyselect_1.2.0 qvalue_2.34.0 rstudioapi_0.15.0 viridis_0.6.4
[49] codetools_0.2-19 lattice_0.21-9 tibble_3.2.1 plyr_1.8.9
[53] treeio_1.26.0 withr_2.5.2 KEGGREST_1.42.0 evaluate_0.23
[57] gridGraphics_0.5-1 scatterpie_0.2.1 polyclip_1.10-6 Biostrings_2.70.1
[61] pillar_1.9.0 BiocManager_1.30.22 ggtree_3.10.0 ggfun_0.1.3
[65] generics_0.1.3 RCurl_1.98-1.13 munsell_0.5.0 scales_1.3.0
[69] tidytree_0.4.6 glue_1.6.2 lazyeval_0.2.2 tools_4.3.2
[73] data.table_1.14.10 fgsea_1.28.0 fs_1.6.3 graphlayouts_1.0.2
[77] fastmatch_1.1-4 tidygraph_1.3.0 cowplot_1.1.2 grid_4.3.2
[81] tidyr_1.3.0 ape_5.7-1 colorspace_2.1-0 nlme_3.1-163
[85] GenomeInfoDbData_1.2.11 patchwork_1.1.3 ggforce_0.4.1 cli_3.6.2
[89] fansi_1.0.6 viridisLite_0.4.2 dplyr_1.1.4 gtable_0.3.4
[93] yulab.utils_0.1.4 digest_0.6.33 ggrepel_0.9.4 ggplotify_0.1.2
[97] farver_2.1.1 memoise_2.0.1 lifecycle_1.0.4 httr_1.4.7
[101] GO.db_3.18.0 bit64_4.0.5 MASS_7.3-60 `

@guidohooiveld
Copy link

guidohooiveld commented Feb 5, 2024

It happens that this has also been recently asked and addressed at the GitHub of enrichplot, which you likely have missed. The default colors have been changed, as well as the way to change colors.

Please check that thread: YuLab-SMU/enrichplot#268

... and post back whether it worked for you (or not).

@GuanKX99
Copy link
Author

Thank you! It works for me

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