diamondPlot to construct a diamond plot. It's normally not necessary to call this function directly: instead, use meansDiamondPlot, meanSDtoDiamondPlot, and factorLoadingDiamondCIplot.
ggDiamondLayer(data, ciCols = 1:3, colorCol = NULL, generateColors = NULL, fullColorRange = NULL, color = "black", otherAxisCol = 1:nrow(data), autoSize = NULL, fixedSize = 0.15, ...)
diamondCoordinates(values, otherAxisValue = 1, direction = "horizontal", autoSize = NULL, fixedSize = 0.15)generateColors, it is usually desirable to specify the minimum and maximum possible value corresponding to the outer anchors of that gradient. For example, when plotting numbers from 0 to 100 using a gradient from 'red' through 'orange' to 'green', none of the means may actually be 0 or 100; the lowest mean may be, for example, 50. If no fullColorRange is specified, the diamond representing that lowest mean of 50 wil be red, not orange. When specifying the fullColorRange, the lowest and highest 'colors' in generateColors are anchored to the minimum and maximum values of fullColorRange.
fixedSize determines
the height to use.
geom_polygon. This can be used to set, for example, the alpha value of the diamonds.
direction is 'horizontal') or the X axis value (if direction is 'vertical').
ggDiamondLayer returns a ggplot geom_polygon object, which can then be used in ggplot plots (as diamondPlot does).diamondCoordinates returns a set of four coordinates that together specify a diamond.
meansDiamondPlot, meanSDtoDiamondPlot, factorLoadingDiamondCIplot, diamondPlot
## Not run:
# ### (Don't run this example as a test, because we
# ### need the ggplot function which isn't part of
# ### this package.)
#
# ### The coordinates for a simple diamond
# diamondCoordinates(values = c(1,2,3));
#
# ### Plot this diamond
# ggplot() + ggDiamondLayer(data.frame(1,2,3));
# ## End(Not run)
Run the code above in your browser using DataLab