UPDATE_CELL_DATA = 0; count = Columns (SELECTED_CHART_DATA); colMin = SELECTED_CHART_DATA [0]; colMax = SELECTED_CHART_DATA [0]; for (counter=0; counter < count; counter = counter+1) { term = SELECTED_CHART_DATA [counter]; if (termcolMax) { colMax = term; } } } fprintf (stdout, "\nMin Value (data min = ", colMin,") = "); fscanf (stdin, "Number", colMin); term = colMin-1; while (term<=colMin) { fprintf (stdout, "\nMax Value (data max = ", colMax,") = "); fscanf (stdin, "Number", term); } colMax = term; numberOfBins = 0; if (colMin==colMax) { numberOfBins = 1; } else { while (numberOfBins<1) { fprintf (stdout, "\nNumber of bins = "); fscanf (stdin, "Number", numberOfBins); } } matrixOfCounts = {numberOfBins, 2}; colMax = (colMax-colMin)/numberOfBins; if (colMax==0) { colMax = 0; } for (counter=0; counter < count; counter = counter+1) { term = Min(((SELECTED_CHART_DATA [counter]-colMin)/colMax)$1,numberOfBins-1); matrixOfCounts [term][1] = matrixOfCounts [term][1]+1; } for (counter=0; counter < numberOfBins; counter = counter+1) { matrixOfCounts [counter][0] = colMin; matrixOfCounts [counter][1] = matrixOfCounts [counter][1]/count; colMin = colMin + colMax; } labelMatrix = {{"Bin Left Bound", "Bin Weight"}}; promptString = "Data Histogram"; OpenWindow (CHARTWINDOW,{{promptString} {"labelMatrix"}, {"matrixOfCounts"}, {"Bar Chart"}, {labelMatrix[0]}, {labelMatrix[1]}, {"Value"}, {""}, {"Weight"}, {"0"}}, "SCREEN_WIDTH-60;SCREEN_HEIGHT-50;30;50");