Darwin Help

Back to Index

DrawStackedBar

Function DrawStackedBar - histogram with multiple values on each bar

Calling Sequence  DrawStackedBar(data,labels,legend)
Parameters
NameTypeDescription

data matrix(numeric)data values dim m x n
labels array(optional) dim n, labels of each vertical bar
legend array(optional) dim m, description of each stack

anything(optional) see ?PlotArguments
Return Type  NULL
Synopsis DrawStackedBar produces a histogram of the numerical values given in data. Each vertical bar is composed of several segments, corresponding to the m lists of values, stacked on top of each other. The data values are printed inside each stacked segment of the bars. To have the m values side by side (instead of stacked), use ?DrawHistogram. The results of DrawStackedBar are placed in a file, following the same conventions as DrawPlot. The plot can be seen with ViewPlot().
Examples
> DrawStackedBar( [ [ 38, 180, 42 ], [ 42, 40, 48] ],
                 [ 'politicians', 'darwin users', 'boxers'],
                 [ 'IQ', 'shoe size' ] );

> ViewPlot();

See also BrightenColor,   ColorPalette,   DrawDistribution,   DrawDotplot,   DrawGraph,   DrawHistogram,   DrawPlot,   DrawPointDistribution,   DrawTree,   GetColorMap,   Plot2Gif,   PlotArguments,   Set,   SmoothData,   StartOverlayPlot,   StopOverlayPlot,   ViewPlot