tmpDf <- data.frame(item1 = rnorm(50, 1.6, 1),
item2 = rnorm(50, 2.6, 2),
item3 = rnorm(50, 4.1, 3));
### A simple diamond plot
meansDiamondPlot(tmpDf);
### A diamond plot with manually
### specified labels and colors
meansDiamondPlot(tmpDf,
labels=c('First',
'Second',
'Third'),
diamondColors=c('blue', 'magenta', 'yellow'));
### Using a gradient for the colors
meansDiamondPlot(tmpDf,
labels=c('First',
'Second',
'Third'),
generateColors = c("magenta", "cyan"),
fullColorRange = c(1,5));
Run the code above in your browser using DataLab