Method hist
| Improve this Doc View Sourcehist(Double[], Double, Double, Int32, Hist)
plhist: Plot a histogram from unbinned data
Declaration
public static void hist(Double[] data, Double datmin, Double datmax, Int32 nbin, Hist opt)
Parameters
Type | Name | Description |
---|---|---|
Double[] | data | A vector containing the values of the n data points. |
Double | datmin | Left-hand edge of lowest-valued bin. |
Double | datmax | Right-hand edge of highest-valued bin. |
Int32 | nbin | Number of (equal-sized) bins into which to divide the interval xmin to xmax. |
Hist | opt | Is a combination of several flags: opt=PL_HIST_DEFAULT: The axes are automatically rescaled to fit the histogram data, the outer bins are expanded to fill up the entire x-axis, data outside the given extremes are assigned to the outer bins and bins of zero height are simply drawn. opt=PL_HIST_NOSCALING|...: The existing axes are not rescaled to fit the histogram data, without this flag, plenv is called to set the world coordinates. opt=PL_HIST_IGNORE_OUTLIERS|...: Data outside the given extremes are not taken into account. This option should probably be combined with opt=PL_HIST_NOEXPAND|..., so as to properly present the data. opt=PL_HIST_NOEXPAND|...: The outer bins are drawn with equal size as the ones inside. opt=PL_HIST_NOEMPTY|...: Bins with zero height are not drawn (there is a gap for such bins). |
Remarks
Plots a histogram from n data points stored in the data vector. This routine bins the data into nbin bins equally spaced between datmin and datmax, and calls plbin to draw the resulting histogram. Parameter opt allows, among other things, the histogram either to be plotted in an existing window or causes plhist to call plenv with suitable limits before plotting the histogram.