
Last chance! 50% off unlimited learning
Sale ends in
ggDiamondLayer
. It's normally not necessary to call this function directly: instead, use meansDiamondPlot
, meanSDtoDiamondPlot
, and factorLoadingDiamondCIplot
.
diamondPlot(data, ciCols = 1:3, colorCol = NULL, otherAxisCol = NULL, yValues = NULL, yLabels = NULL, ylab = NULL, autoSize = NULL, fixedSize = 0.15, xlab = "Effect Size Estimate", theme = theme_bw(), color = "black", ...)
yValues
.
otherAxisCol
.
fixedSize
determines
the height to use.
ggDiamondLayer
.
ggplot
plot with a ggDiamondLayer
is returned.
meansDiamondPlot
, meanSDtoDiamondPlot
, factorLoadingDiamondCIplot
, ggDiamondLayer
tmpDf <- data.frame(lo = c(1, 2, 3),
mean = c(1.5, 3, 5),
hi = c(2, 4, 10),
color = c('green', 'red', 'blue'));
### A simple diamond plot
diamondPlot(tmpDf);
### A diamond plot using the specified colours
diamondPlot(tmpDf, colorCol = 4);
### A diamond plot using automatically generated colours
### using a gradient
diamondPlot(tmpDf, generateColors=c('green', 'red'));
### A diamond plot using automatically generated colours
### using a gradient, specifying the minimum and maximum
### possible values that can be attained
diamondPlot(tmpDf, generateColors=c('green', 'red'),
fullColorRange=c(1, 10));
Run the code above in your browser using DataLab