| Calling Sequence
| DrawHistogram(data,labels,legend)
|
| Parameters
| | Name | Type | Description |
|
| data
| array(numeric) | data values, dim n (single histogram) or |
| data
| matrix(numeric) | data values dim m x n (multiple histograms) |
| labels
| array | (optional) dim n labels of each vertical bar(s) |
| legend
| array | (optional) dim m description of each histogram |
| anything | (optional) see ?PlotArguments |
|
| Return Type
| NULL |
| Synopsis
| DrawHistogram produces a plot of a histogram of
the numerical values given in data. That is, when "data" is a single
array (dim n), hence a single histogram, each numerical value of data is
represented by a vertical bar with its height proportional to its
data value.
The data values are printed at the top of each bar.
When "data" is a matrix (dim m x n), this means that m values will be
be plotted together; this will be done with proportional vertical
bars, side by side.
To have the m values stacked on top of each other (instead of side by side),
use ?DrawStackedBar.
The results of DrawHistogram are placed in a file, following
the same conventions as DrawPlot.
The plot can be seen with ViewPlot(). |
| Examples
| > DrawHistogram( [1,2,3,4,3,2,1] ); ViewPlot();
> DrawHistogram( [ [ 38, 180, 42 ], [ 42, 40, 48] ],
[ 'politicians', 'darwin users', 'boxers'],
[ 'IQ', 'shoe size' ] );
> ViewPlot();
|
| See also
| BrightenColor, ColorPalette, DrawDistribution, DrawDotplot, DrawGraph, DrawPlot, DrawPointDistribution, DrawStackedBar, DrawTree, GetColorMap, Plot2Gif, PlotArguments, Set, SmoothData, StartOverlayPlot, StopOverlayPlot, ViewPlot |