SachaEpskamp / qgraph

Developmental version of qgraph
GNU General Public License v2.0
68 stars 21 forks source link

Can qgraph use more palette like jama style, etc.? #82

Open dengxuebin opened 10 months ago

dengxuebin commented 10 months ago

Hi SachaEpskamp
I find the choice of palettes may be few and wonder whether it is possible to add more. Or are there other methods used to solve the problem? Hope your reply. Thanks a lot!

SachaEpskamp commented 10 months ago

Hi! Sure, the palettes are implemented here:

https://github.com/SachaEpskamp/qgraph/blob/master/R/qgraph.R#L2662-L2694

Making use of some custom functions here:

https://github.com/SachaEpskamp/qgraph/blob/master/R/palettes.R

Feel free to propose a set of colors for new palettes!

dengxuebin commented 9 months ago

I got it, but maybe it is not easy for a novice like me . I wish the manipulation is like "+scale_fill_jama()" which is very simple. :grinning: Thanks a lot!

SachaEpskamp commented 9 months ago

I mean, just tell me what colors should be in the palette and how it should be called and I can add it!

dengxuebin commented 9 months ago

Hi SachaEpskamp So glad for your reply. There are two parameters in qgraph, "palette"&"theme", it is better to directly call Sci-Fi Themed Color Palettes for ggplot2 (https://cran.r-project.org/web/packages/ggsci/vignettes/ggsci.html ) and Themes in ggplot2(https://r-charts.com/ggplot2/themes/), sounds like qgraph(..., palette="jama", theme="google"...). For me, I wish to add palettes including "Lancent","JAMA","NPG","Frontiers" for now. If possible , thank you very much.