title: PCA Scaling with ggbiplot
body: <p>I'm trying to plot a principal component analysis using <code>prcomp</code> and <code>ggbiplot</code>. I'm getting data values outside of the unit circle, and haven't been able to rescale the data prior to calling <code>prcomp</code> in such a way that I can constrain the data to the unit circle.</p>
  
  <pre><code>data(wine)
  require(ggbiplot)
  wine.pca=prcomp(wine[,1:3],scale.=TRUE)
  ggbiplot(wine.pca,obs.scale = 1, 
           var.scale=1,groups=wine.class,ellipse=TRUE,circle=TRUE)
  </code></pre>
  
  <p>I tried scaling by subtracting mean and dividing by standard deviation before calling <code>prcomp</code>:</p>
  
  <pre><code>wine2=wine[,1:3]
  mean=apply(wine2,2,mean)
  sd=apply(wine2,2,mean)
  for(i in 1:ncol(wine2)){
    wine2[,i]=(wine2[,i]-mean[i])/sd[i]
  }
  wine2.pca=prcomp(wine2,scale.=TRUE)
  ggbiplot(wine2.pca,obs.scale=1, 
           var.scale=1,groups=wine.class,ellipse=TRUE,circle=TRUE)
  </code></pre>
  
  <p><code>ggbiplot</code> package installed as follows:</p>
  
  <pre><code>require(devtools)
  install_github('ggbiplot','vqv')
  </code></pre>
  
  <p>Output of either code chunk:</p>
  
  <p><img src="https://i.stack.imgur.com/jKRGy.png" alt="enter image description here"></p>
  
  <p>Per @Brian Hanson's comment below, I'm adding an additional image reflecting the output I'm trying to get.</p>
  
  <p><img src="https://i.stack.imgur.com/PSWEX.png" alt="enter image description here"></p>