Maxima Function
barsplot (list)
barsplot(list,option_1,option_2,...)
barsplot(one_column_matrix)
barsplot(one_column_matrix,option_1,option_2,...)
Similar to histogram but for discrete, numeric or categorical, statistical variables. These are the options,
'outputdev, default "x", indicates the output device; correct values are "x", "eps" and "png", for the screen, postscript and png format files, respectively.
'maintitle, default "", is the main title between double quotes.
'axisnames, default ["x", "Fr."], is a list with the names of axis x and y.
'picturescales, default [1.0, 1.0], scaling factors for the size of the plot.
'relbarwidth, default 0.9, a decimal number between 0 and 1 to control bars width.
'barcolor, default 1, an integer to indicate bars color.
'colorintensity, default 1, a decimal number between 0 and 1 to fix color intensity.
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,