Statistics - Maple Help

Home : Support : Online Help : Graphics : Statistics : Statistics/AgglomeratedPlot

Statistics

 AgglomeratedPlot
 generate agglomerated plots

 Calling Sequence AgglomeratedPlot(X, Y, Z, options, plotoptions)

Parameters

 X - first data sample Y - (optional) second data sample Z - (optional) third data sample options - (optional) equation(s) of the form option=value where option is one of length, or n; specify options for generating the agglomerated plot plotoptions - options to be passed to the plots[display] command

Options

 The options argument can contain one or more of the options shown below. All unrecognized options will be passed to the plots[display] command. See plot[options] for details.
 • length = numeric
 This option specifies the length of one side of the cubes that are used to check for appropriately dense data clusters. It also defines the maximum size of a box used to replace such data clusters.  If length is zero, or unspecified, then a default value is used. The default value is one-tenth of the range of the first data sample.
 • n = numeric
 The value of this option is the minimum number of points that will be replaced by the tightest fitting box that encloses them. The tightest fitting box in one-dimension will always be a line. In higher dimensions, rectangles or boxes may be plotted. If n is zero, or unspecified, a default value will be used. The default value for n is the cube root of the number of points, divided by the number of dimensions of the data (which is the number of data samples passed to AgglomeratedPlot).

Description

 • The AgglomeratedPlot command generates an agglomerated plot for the specified data. This type of plot is often used by cartographers or when there is a large number of data points involved. The aim is to remove the unnecessary detail of each individual point in a plot, and replace dense regions of data with boxes.
 • If n or more points are found within a cube, whose size is defined by length, then they are replaced by the tightest fitting box possible. If n^2 or more points are found within the same cube, then the box will emphasized with thicker borders.
 • The parameters X, Y and Z are the data samples to be plotted. Each can be given as a Vector, Matrix, Array, or list, though they do not all have to be of the same type. They also do not need to be one dimensional, but will be treated as though they are. The first data sample, X, is required, but the second and third data samples, Y and Z respectively, are optional. Note that all data samples must have the same number of elements.
 • This function is part of the Statistics package, so it can be used in the short form AgglomeratedPlot(..) only after executing the command with(Statistics).  However, it can always be accessed through the long form of the command by using Statistics[AgglomeratedPlot](..).

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $\mathrm{data}≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),75\right):$
 > $\mathrm{AgglomeratedPlot}\left(\mathrm{data},n=2.5,\mathrm{length}=0.25,\mathrm{size}=\left[600,200\right]\right)$
 > $A≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),200\right):$
 > $B≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),200\right):$
 > $C≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),200\right):$
 > $\mathrm{AgglomeratedPlot}\left(A,B,C,n=2,\mathrm{length}=0.5\right)$

The commands to create the plots from the Plotting Guide are

 > $\mathrm{data1}≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),40\right):$
 > $\mathrm{data2}≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),40\right):$
 > $\mathrm{AgglomeratedPlot}\left(\mathrm{data1},\mathrm{data2},n=2\right)$
 > $A≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{GammaDistribution}\left(1,1\right)\right),30\right):$
 > $B≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{GammaDistribution}\left(1,3\right)\right),30\right):$
 > $C≔\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),30\right):$
 > $\mathrm{AgglomeratedPlot}\left(A,B,C,n=2,\mathrm{length}=0.5\right)$