backtrace SciMax Toolbox bashindices

SciMax Toolbox >> barsplot

barsplot

Maxima Function

Calling Sequence

barsplot (list)
barsplot(list,option_1,option_2,...)
barsplot(one_column_matrix)
barsplot(one_column_matrix,option_1,option_2,...)

Description

Similar to histogram but for discrete, numeric or categorical, statistical variables. These are the options,

This example plots the barchart for groups A and B of patients in sample s3,

(%i1) load (descriptive)$
(%i2) load (numericalio)$
(%i3) s3 : read_matrix (file_search ("biomed.data"))$
(%i4) barsplot (col (s3, 1), 'maintitle = "Groups of patients",
 'axisnames=["Group", "# of individuals"], 'colorintensity=0.2)$

The first column in sample s3 stores the categorical values A and B, also known sometimes as factors. On the other hand, the positive integer numbers in the second column are ages, in years, which is a discrete variable, so we can plot the absolute frequencies for these values,

(%i1) load (descriptive)$
(%i2) load (numericalio)$
(%i3) s3 : read_matrix (file_search ("biomed.data"))$
(%i4) barsplot (col (s3, 2), 'maintitle = "Ages",
 'axisnames = ["Years", "# of individuals"], 'colorintensity = 0.2,
 'relbarwidth = 0.6)$

See also function .

backtrace SciMax Toolbox bashindices