Example: Graphically displaying matrix data


The best way to demonstrate how you can use DADiSP to analyze and summarize your data graphically is to walk through an example Worksheet. The end result of the example is an error bar plot in the final window, which is equivalent to a common boxplot.


In W1, generate a matrix of data by typing:


W1: ravel(grand(100,1),10)


In W2, calculate the column mean with


W2: colmean(w1)


As we mentioned above, DADiSP operates on columns of data. The result of our COLMEAN operation is a ten-column table with each column only containing a single value. To see this, type:




To convert this result into a data column, we must swap row and column information. Type:




In our next three statistical calculations, therefore, we will build the TRANSPOSE operation into the window formula.


W3: transpose(colmax(w1))

W4: transpose(colmin(w1))

W5: transpose(colstdev(w1))


The ERRORBAR function allows us to combine all of our data column statistics into a single presentation analogous to a boxplot. The format of the ERRORBAR function is:


ERRORBAR(bartop, sticktop, stickbottom, barbottom, midpoint, tees)


where tees is an OFF/ON toggle equal to 0 or 1.


In W6, type the following:


errorbar(w2+w5, w3, w4, w2-w5, w5, 1)


For each column of data, this result shows the maximum and minimum values represented by the bartops, and the range of standard deviation around the mean represented by the solid bar. Mean values are shown as a line chart.