PLHIST(3plplot)
π PLHIST β plot a histogram from unbinned data π
okay so this is the PLplot API page for plhist(3plplot), bestie. sit down, grab a strawberry π, we're making a histogram.
β¨ SYNOPSIS β¨
plhist(n, data, datmin, datmax, nbin, opt)
πΈ DESCRIPTION πΈ
So plhist plots a histogram from n data points that are chillin' in the data vector. That's the whole vibe.
Here's the tea: this routine bins your data into nbin bins that are equally spaced between datmin and datmax, and then it calls plbin(3plplot) to actually draw the resulting histogram. lowkey it's doing the prep work and letting plbin serve the look π
The opt parameter is the main character here β it lets you, among other things, either plot the histogram into a window you already have, or it makes plhist(3plplot) call plenv(3plplot) with suitable limits before plotting. your choice, icon π
Redacted form: plhist(data, datmin, datmax, nbin, opt)
This function is used in example 5. fr fr, go look. π
π ARGUMENTS π
n(PLINT(3plplot), input) β number of data points. just the count, nothing scary.data(PLFLT_VECTOR(3plplot), input) β the vector holding the values of thosendata points. this is your actual data, bestie π«Άdatmin(PLFLT(3plplot), input) β left-hand edge of the lowest-valued bin.datmax(PLFLT(3plplot), input) β right-hand edge of the highest-valued bin.nbin(PLINT(3plplot), input) β number of (equal-sized) bins you're dividing the intervalxmintoxmaxinto.opt(PLINT(3plplot), input) β a combo of several flags, and honestly this is the whole personality of the function. read carefully: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. the full default experience β¨opt=PL_HIST_NOSCALING|...: the existing axes are not rescaled to fit the histogram data. without this flag,plenv(3plplot)is called to set the world coordinates. no cap.opt=PL_HIST_IGNORE_OUTLIERS|...: data outside the given extremes are not taken into account. > this option should probably be combined withopt=PL_HIST_NOEXPAND|..., so as to properly present the data. π listen to the docs on this one.opt=PL_HIST_NOEXPAND|...: the outer bins are drawn with equal size as the ones inside. no stretching, they stay their size π§opt=PL_HIST_NOEMPTY|...: bins with zero height are not drawn β there is a gap for such bins. aesthetic gaps, periodt.
π AUTHORS π
Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. iconic behavior, honestly.
π¦ SEE ALSO π¦
PLplot documentation at http://plplot.sourceforge.net/documentation.php.
go forth and bin your data, bestie. the histogram won't plot itself π
kisses, this was the PLplot API PLHIST(3plplot) page β source/version PLplot API, dated August, 2026 πΈπ
π
π¦ where this page comes from
- ubuntu stonking: plplot-doc 5.15.0+dfsg3-4 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms