Skip to content

superimpose histogram on biplot

1 message · Kevin Wright

#
I know that this is a late follow-up, but I just found this posting
today while searching for something else.

Two of my colleagues and myself have explored the use of Mosaic plots
for displaying the amount of variation captured by each axis.  See the
following paper:

@Article{Laffont2007,
  author =       {Jean-Louis Laffont and Mohamed Hanafi and Kevin Wright},
  title =        {Numerical and Graphical Measures to Facilitate the
                  Interpretation of GGE Biplots},
  journal =      {Crop Science},
  year =         2007,
  volume =       47,
  pages =        {990-996},
  annote =       {File: Biplots}
}

Here is the example code at the end of the paper.

Y = data.frame(E1 = c(50, 55, 65, 50, 60, 65, 75),
E2 = c(67, 71, 76, 80, 82, 89, 95),
E3 = c(90, 93, 95, 102, 97, 106, 117),
E4 = c(98, 102, 105, 130, 135, 137, 133),
E5 = c(120, 129, 134, 138, 151, 153, 155))
rownames(Y) = c("G1", "G2", "G3", "G4", "G5",
"G6", "G7")
Y = scale(Y, center = TRUE, scale = FALSE)
YG = matrix(rowMeans(Y)) %*% rep(1,ncol(Y))
YGE = Y - YG
Ysvd = svd(Y) # Singular value decomposition
G = U = Ysvd$u
H = Ysvd$v %*% diag(Ysvd$d)
# Formula: SSGk = diag(U? YG YG? U)
SSGk = diag(crossprod(crossprod(YG,U)))
# Formula: SSGEk = diag(U? YGE YGE? U)
SSGEk = diag(crossprod(crossprod(YGE,U)))
# Proportion of SS for each axis
TSS = sum(Y^2)
AxisProp = round(100*(SSGk + SSGEk)/TSS,0)
# First, the environment-focused GGE biplot
biplot(G[,1:2], H[,1:2], xlabs = rownames(Y),ylabs =
colnames(Y),
xlab = paste("Axis 1: ",AxisProp[1],"%"),
ylab = paste("Axis 2: ",AxisProp[2],"%"))
# Then the mosaic plot
mosaicdata = data.frame(G = SSGk, GE = SSGEk)
mosaicplot(mosaicdata, main = "", off = c(5,1),
cex.axis = 1, col = c("dimgray", "snow2"))

Kevin Wright


On Tue, Apr 1, 2008 at 11:37 AM, St?phane Dray
<dray at biomserv.univ-lyon1.fr> wrote: