6

The scales of loadings for biplots produced from stats::biplot and ggplot2::autoplot from ggfortify R package are different. How can I get the same loadings scales for biplots produced from stats::biplot and ggplot2::autoplot from ggfortify R package?

stats::biplot(prcomp(USArrests, scale = TRUE))

enter image description here

library(ggfortify)
ggplot2::autoplot(stats::prcomp(USArrests, scale=TRUE), label = TRUE, loadings.label = TRUE)

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
  • which one do you want? Have `stat::biplot` with equal axes or `autoplot` with different axes? The second one is probably impossible: http://stackoverflow.com/a/3101876/4132844 – scoa Nov 30 '15 at 11:36
  • For `stats::biplot` the call would be `stats::biplot(prcomp(USArrests, scale = TRUE),pc.biplot=T)` , but I assume you want the autoplot version because this would be to easy for the bounty. :-) – bluefish Dec 07 '15 at 21:22
  • there are a few questions about dual axes in ggplot and [some examples](http://rpubs.com/kohske/dual_axis_in_ggplot2) floating around. might be easier to make your base plot look better than adding two extra ggplot axes – rawr Dec 08 '15 at 21:23

0 Answers0