Graphical Data Analysis - Maple Help

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

Graphical Data Analysis

Description

 The Statistics package supports a variety of tools for visualizing univariate and multivariate data. These include bar charts, line charts, histograms, scatter plots, etc. The following is a list of available commands.

Available Commands

 generate agglomerated plots create area charts from data create bar charts from data create box plots from data generate bubble plots create column graphs from data generate cumulative sum charts plot the density of a random variable generate error plots generate frequency plots generate histograms plot the kernel density estimate of a data set generate line charts generate normal plots generate pie charts generate point plots generate probability plots plot a profile of the likelihood function plot a profile of the log likelihood function generate quantile-quantile plots generate scatter plots generate sunflower plots generate surface plots generate symmetry plots generate tree maps

 These commands can be used with tools available in plots and plottools packages to create multi-component plots.

Live Data Plots Palette

 The Live Data Plots palette makes it easy to create and customize statistical plots, including area charts, histograms, pie charts, and scatter plots. For more details on the Live Data Plots palette, see Live Data Plots.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $A:=⟨5,2,5,8,4,5,10,5⟩:$
 > $B:=\mathrm{map}\left(t→t-0.5,A\right):$

Generate bar chart and line chart

 > $P:=\mathrm{ColumnGraph}\left(A,\mathrm{legend}=\left["Data Set A"\right]\right):$
 > $Q:=\mathrm{LineChart}\left(B,\mathrm{color}=\mathrm{red},\mathrm{thickness}=3,\mathrm{symbol}=\mathrm{circle},\mathrm{symbolsize}=10,\mathrm{legend}=\left["Data Set B"\right]\right):$

Superimpose the two plots and display the result.

 > $\mathrm{plots}[\mathrm{display}]\left(P,Q,\mathrm{title}="Bar Chart and Line Chart",{\mathrm{axis}}_{2}=\left[\mathrm{gridlines}=\left[7,\mathrm{thickness}=2,\mathrm{linestyle}=\mathrm{dash},\mathrm{color}=\mathrm{white}\right]\right]\right)$

Generate a pie chart

 > $T:=⟨a,b,c,a,a,b,a,a,a,b,b,c,c,1,2,3,a,1⟩:$
 > $\mathrm{PieChart}\left(T,\mathrm{sector}=0..180,\mathrm{color}=\mathrm{red}..\mathrm{yellow}\right)$

Generate a random sample drawn from the non-central Beta distribution. Generate a box plot and a histogram and display them in a single plot.

 > $X:=\mathrm{RandomVariable}\left(\mathrm{NonCentralBeta}\left(1,2,3\right)\right):$
 > $S:=\mathrm{Sample}\left(X,{10}^{4}\right):$
 > $P:=\mathrm{BoxPlot}\left(S,\mathrm{orientation}=\mathrm{horizontal},\mathrm{offset}=-0.6,\mathrm{width}=0.1,\mathrm{deciles}=\mathrm{false}\right):$
 > $Q:=\mathrm{Histogram}\left(S\right):$
 > $R:=\mathrm{DensityPlot}\left(X,\mathrm{range}=0..1,\mathrm{thickness}=3\right):$
 > $\mathrm{plots}[\mathrm{display}]\left(P,Q,R,\mathrm{gridlines}=\mathrm{true}\right)$

Use probability plot to compare a sample distribution and the original distribution

 > $T:=\mathrm{Sample}\left(X,{10}^{2}\right):$
 > $\mathrm{ProbabilityPlot}\left(T,X\right)$

The Explore command can be used to interactively explore characteristics of datasets, such as point density using the ScatterPlot and SunflowerPlot commands:

 > $Y:=\mathrm{Vector}\left(\left[\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),200\right),\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(2.6,1\right)\right),200\right)\right]\right):$
 > $Z:=\mathrm{Vector}\left(\left[\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(0,1\right)\right),200\right),\mathrm{Sample}\left(\mathrm{RandomVariable}\left(\mathrm{Normal}\left(2.6,1\right)\right),200\right)\right]\right):$
 > ExcisePoints := proc( fractionexcised, dataset1, dataset2, plottype )   uses Statistics;    local plotopts;    plotopts := view = [min(dataset1)..max(dataset1), min(dataset2)..max(dataset2)];    if( plottype = SunflowerPlot,           SunflowerPlot( Excise(evalf[3](fractionexcised), dataset1, dataset2 ), plotopts ),           ScatterPlot( Excise(evalf[3](fractionexcised), dataset1, dataset2 ), plotopts  ) ); end proc:
 > Explore( ExcisePoints( fractionexcised, Y, Z, plottype ),         parameters = [[plottype = [ScatterPlot,SunflowerPlot], label =  , placement = bottom],         [ fractionexcised = -1.0 .. 1.0, label = Fraction Excised ] ],         initialvalues = [fractionexcised = 0],         title = "Excising Data" );

Excising Data

 >