Closed kuratanp closed 3 years ago
These are ggplot2 plots, so you can easily modify them afterwards.
As package ggplot2 is very popular, you find lots of answers just Googling and on Stack Overflow.
E.g. try Googling "change background color ggplot2".
For the labels, you can use + labs(x = , y = , title = )
.
You can learn more about ggplot2 at https://privefl.github.io/R-presentation/ggplot2.html.
Thank you for the quick reply. What I am confused more about is how to format my object produced from x <-pcadapt(...) into a data.frame to generate ggplots. Would you provide me with an example using tidyr?
You can find some examples at https://github.com/bcm-uga/pcadapt/blob/master/R/plotUtils.R.
Hello, I am trying to figure out how to modify the default PCA plot that the PCAdapt package generates. For example, I want the background color to be white instead of gray, change the title, and add the % of variance explained on the x and y-axes (e.g., PC1 21%). Any pointers would be appreciated.