rggbiplot

R ggbiplot aesthetics


is it possible to change the thickness of the ellipses (incl circle) in ggbiplot? The arguments don't seem to have that option. Is there another way around it? So far I've dealt with this issue by making my data points more transparent.


Solution

  • I assumed you got a recent version of ggbiplot from github (19 Jun 2015 https://github.com/vqv/ggbiplot). In this one, the circle thickness is hard-coded, but you can modify the code easily. The parameter in question is set here (around line 86 in the definition of ggbiplot()):

    if (circle) {
          theta <- c(seq(-pi, pi, length = 50), seq(pi, -pi, 
                                                    length = 50))
          circle <- data.frame(xvar = r * cos(theta), yvar = r * 
                                 sin(theta))
          g <- g + geom_path(data = circle, color = muted("white"), 
                             size = 1/2, # <= MODIFY HERE
          alpha = 1/3)
            }