Search


Ploticus > Prefabs >
dist prefab for creating distribution histograms


dist computes and displays a frequency distribution (histogram) on one data field. The data file does not need to be ordered in any particular way. The field may contain continuous numeric data, or alphanumeric values. Continuous numeric data is the default, but the cats option may be used to produce category distributions (each unique value having a bar). With continuous numeric data, "bins" will be set up and values will be placed into these bins (any alpha values will be lumped into one "alpha" category).

View the dist prefab examples


A user-contributed prefab called multidist is also available; it can do multiple, overlaid frequency distributions.

Hint: if no bars are appearing, try specifying bar size, eg. barwidth=0.1. This glitch is due to the fact that default bar widths are related to data space.


Parameters

Prefab
parameter
name
Data type DefaultDescription Examples
(ignore line wrapping)
Standard parameters     Most of the standard prefab parameters may be used. You must specify data (the name of the input data file). The legend parameters and ptselect aren't available with this prefab.
x data field must be specified Identifies the data field to be used when computing the distribution. Old name: fld x=2
x=pmb
binsize numeric based on data The size of one "bin" for numeric distributions. binsize=2.5
cats yes or no no If yes, a category distribution, using alphanumeric data, will be done. cats=yes
curve yes
or
linedetails
  If specified, a bspline curve will be fit to the histogram and displayed. curve=yes
color color pink Color of the histogram bars. color=orange
barwidth inches or cm based on data The width of the bars. barwidth=0.06
savetbl yes | no   If yes, a the computed frequency distribution will be dumped to the diagnostic stream (usually standard error). savetbl=yes
order natural
or
mag
or
rev
natural Controls the order in which bars are drawn from left to right, with cats. natural shows them in alphabetical order, mag based on magnitude from low to high, and rev shows them from high to low. order=mag


 


Ploticus 2.42 ... May 2013 Terms of use / GPL