1PLHIST(3plplot) PLplot API PLHIST(3plplot)
2
3
4
6 plhist - Plot a histogram from unbinned data
7
9 plhist(n, data, datmin, datmax, nbin, opt)
10
12 Plots a histogram from n data points stored in the data vector. This
13 routine bins the data into nbin bins equally spaced between datmin and
14 datmax, and calls plbin(3plplot) to draw the resulting histogram. Pa‐
15 rameter opt allows, among other things, the histogram either to be
16 plotted in an existing window or causes plhist(3plplot) to call
17 plenv(3plplot) with suitable limits before plotting the histogram.
18
19 Redacted form: plhist(data, datmin, datmax, nbin, opt)
20
21 This function is used in example 5.
22
24 n (PLINT(3plplot), input)
25 Number of data points.
26
27 data (PLFLT_VECTOR(3plplot), input)
28 A vector containing the values of the n data points.
29
30 datmin (PLFLT(3plplot), input)
31 Left-hand edge of lowest-valued bin.
32
33 datmax (PLFLT(3plplot), input)
34 Right-hand edge of highest-valued bin.
35
36 nbin (PLINT(3plplot), input)
37 Number of (equal-sized) bins into which to divide the interval
38 xmin to xmax.
39
40 opt (PLINT(3plplot), input)
41 Is a combination of several flags: opt=PL_HIST_DEFAULT: The axes
42 are automatically rescaled to fit the histogram data, the outer
43 bins are expanded to fill up the entire x-axis, data outside the
44 given extremes are assigned to the outer bins and bins of zero
45 height are simply drawn. opt=PL_HIST_NOSCALING|...: The exist‐
46 ing axes are not rescaled to fit the histogram data, without
47 this flag, plenv(3plplot) is called to set the world coordi‐
48 nates. opt=PL_HIST_IGNORE_OUTLIERS|...: Data outside the given
49 extremes are not taken into account. This option should probably
50 be combined with opt=PL_HIST_NOEXPAND|..., so as to properly
51 present the data. opt=PL_HIST_NOEXPAND|...: The outer bins are
52 drawn with equal size as the ones inside.
53 opt=PL_HIST_NOEMPTY|...: Bins with zero height are not drawn
54 (there is a gap for such bins).
55
56
57
59 Many developers (who are credited at http://plplot.org/credits.php)
60 have contributed to PLplot over its long history.
61
63 PLplot documentation at http://plplot.org/documentation.php.
64
65
66
67 July, 2022 PLHIST(3plplot)