Satimage Previous | Next
QuickHistogram
Home Documentation SmileLab Scripting Making graphs by script QuickPlotLib QuickHistogram  
QuickHistogram(y, n, the_object) plots the histogram of the values stored in y (an array of real or a list of numbers), distributed into n categories.

You will probably want to edit the graphical settings of the histogram, since the default settings make black bars with a black contour. Use the Information dialog (use the contextual menu to open the Information dialog), or proceed by script as shown below.
set y to runningsum (randomarray 10000 range {-1, 1})
set c to QuickHistogram(y, 50, 0)

set c's pen width to 0.5
set c's fill color to {2 / 4, 3 / 4, 4 / 4}
set v to c's container
set v's xlabel to "locations"
set v's ylabel to "samples"
set v's name to "Distribution of the location of a random walker"
draw v's window


Import script
Copyright ©2008 Paris, Satimage