powered by
HWGenotypePlot makes a scatterplots of the AB or BB frequency versus the AA frequency and represents a blue curve indicating the Hardy-Weinberg equilibrium condition.
HWGenotypePlot
HWGenotypePlot(X, plottype = 1, xlab = expression(f[AA]), ylab = ifelse(plottype == 1, expression(f[AB]), expression(f[BB])), asp = 1, pch = 19, xlim = c(0, 1), ylim = c(0, 1), cex = 1, cex.axis = 2, cex.lab = 2, ...)
NULL
A matrix of genotype counts or frequencies with three columns (AA, AB, BB)
plottype=1 produces a plot of AB versus AA, plottype=2 produced a plot of BB versus AA.
plottype=1
plottype=2
A label for the x axis
A label for the y axis
Aspec ratio (1 by default)
Plotting charachter (19 by default)
Limits for the x axis (0-1 by default)
Limits for the y axis (0-1 by default)
Character expansion factor (1 by default)
Character expansion factor for the axes (2 by default)
Character expansion factor for labels of axis (2 by default)
Additional arguments for the plot function
plot
Jan Graffelman jan.graffelman@upc.edu
HWTernaryPlot
n <- 100 # sample size m <- 100 # number of markers Xc <- HWClo(HWData(n,m)) HWGenotypePlot(Xc,plottype=1,main="Heterozygote-homozygote scatterplot")
Run the code above in your browser using DataLab