Statistics - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Statistics

  

TreeMap

  

generate tree maps

 

Calling Sequence

Parameters

Description

Options

Examples

Compatibility

Calling Sequence

TreeMap(X, options, plotoptions)

Parameters

X

-

data

options

-

(optional) equation(s) of the form option=value where option is one of color or datasetlabels; specify options for generating the tree map

plotoptions

-

options to be passed to the plots[display] command

Description

• 

The TreeMap command generates a tree map for the specified data. A tree map is a method of data visualization using nested rectangles, in which the area of a rectangle corresponds to the the magnitude of the corresponding datum.

• 

The first parameter X is a list or Vector of equations; the left-hand side of each equation specifies a value and the right-hand side the associated frequency.

• 

The right-hand side of an input equation can also contain another list or Vector of values; this imposes a hierarchical ordering on the data.

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.

• 

color=name, list, or range

  

This option specifies colors for the individual data sets. When a list of colors is given, each of the rectangles will be colored with the corresponding color in the list. If a range of colors is given, the colors will be generated by selecting an appropriate number of equally spaced points in the corresponding hue range.

• 

datasetlabels=default, none, relative, absolute, or list

  

This option controls data set labels on the tree map rectangles. By default, TreeMap uses data values as labels. The relative option will display, for each rectangle, the percentage value that rectangle occupies in the overall rectangle. The absolute option will display, for each rectangle, the absolute frequency of the corresponding value. Finally, one can specify data set labels as a list of strings.

Examples

withStatistics:

TreeMapA=6,B=6,D=4,E=3,F=2,G=2,H=1

View the character frequencies in the word honorificabilitudinitatibus.

TStringTools:-CharacterFrequencieshonorificabilitudinitatibus

Ta=2,b=2,c=1,d=1,f=1,h=1,i=7,l=1,n=2,o=2,r=1,s=1,t=3,u=2

(1)

View a list of available food items, classified into categories and displayed accordingly.

TreeMapFruits=Apples=2,Bananas=2,Oranges=5,Vegetables=Carrots=3,Potatoes=3,Eggs=12

View the relative populations of the provinces and territories of Canada.

TreeMapT,color=Crimson..Gold

CanadaPopulationAlberta=4121.7,British Columbia=4631.3,Newfoundland and Labrador=527.0,Prince Edward Island=146.3,Manitoba=1282.0,New Brunswick=753.9,Northwest Territories=43.6,Nova Scotia=942.7,Nunavut=36.6,Ontario=13678.7,Quebec=8214.7,Saskatchewan=1125.4,Yukon=36.5:

TreeMapCanadaPopulation,color=blue..red

View the relative size of files in the videos folder installed with Maple.

withFileTools:

VideoListSizeJoinPathvideos,base=datadir,recursive,depth=1

VideoList/usr/local/repository/build/rdgetroll1/maple/slot1/data/videos/explore.ogg=14757215,/usr/local/repository/build/rdgetroll1/maple/slot1/data/videos/World.ogg=3481536,/usr/local/repository/build/rdgetroll1/maple/slot1/data/videos/videoplayer.ogg=8614373

(2)

VideoListevalindetsVideoList,string,Filename

VideoListexplore.ogg=14757215,World.ogg=3481536,videoplayer.ogg=8614373

(3)

TreeMapVideoList

Compatibility

• 

The Statistics[TreeMap] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

Statistics

Statistics[AreaChart]

Statistics[PieChart]

Statistics[Visualization]