I want to include an rCCA variable plot in a publication but I cannot find a way to produce a plot of nice quality; if I increase the size of the font of the variables so that we can properly read them everything gets on top of each other; is there some kind of jitter option ?
You might want to perform variable selection using sGCCA and also possibly use cutoff to show just a subset of important variables. The other option is to use a repel functionality to repel the names away from each other such as the following which could again add too many lines.
Thanks for your answer. I already tried to use the cutoff value but I have several points that are too close together in the one’s that I want to keep. The repel approach would be the best for me indeed. I would be happy to learn more about the additional features you propose for that.
you can do it the primitive way by exporting it as a PDF, and then edit it in e.g. Adobe illustrator. I think this should work really in combination with the repel “function”. You could also set var.names to FALSE and then name the most important variables manually. If you dont have too many variables, you could also use numbers as variable names and add a legend with the real variable names.
Thanks, I tried your suggestion but when I run plotVar_repel function, I do not get any plot and I get an error message saying that plotVar2 function does not exist. If I use plotVar, I also get an error message; “closure” type object not indicated.
Thanks. Now it works, for some unknown reason I had to load the ellipse library to get it working while it’s usually called. The limit of the thing is that it repels among X and Y but not between X and Y so there are still things that are on top of each other… Do you know if there is a way to get it repel both?
Otherwise, I can combine repel with var.names to FALSE on one variable and finish the job with an editor. It’s not my favorite option as it could be seen as data manipulation, but it works.
Unfortunately, that would be too specific for us to accommodate. You can somehow export the data.frames used for plots, combine them, and then apply geom_text_repel to remove the overlaps. You’ll then need to tailor the names and colors according to X or Y.