PLBIN(3plplot)
π PLBIN β plot a histogram from binned data π
ok so bestie, welcome to the plbin page from the PLplot API manual (that's the 3plplot one, iykyk) πΈ this is the whole thing, every flag, every vector, no skips, no cap.
β¨ SYNOPSIS β¨
plbin(nbin, x, y, opt)
π DESCRIPTION π
Bestie, this function plots a histogram. Specifically, it plots one made of nbin bins. The value that goes with the i'th bin lives in x[i], and the number of points sitting in that bin goes in y[i].
β οΈ For proper operation, the values in x[i] must form a strictly increasing sequence. Not vibing with that rule? The function will not be having a good time. π
By default, x[i] is the left-hand edge of the i'th bin. But if you pass opt=PL_BIN_CENTRED, the bin boundaries get placed midway between the values in the x vector instead. Slay, shifted boundaries π
Also, if you're out here with raw unbinned data and you wanna draw a histogram from that, go check out plhist(3plplot) β different function, different vibe, same histogram energy π¦
Redacted form: General: plbin(x, y, opt) Python: plbin(nbin, x, y, opt)
This function is not used in any examples. (yes, really β she's a supporting character, not a main character, and that's okay π«Ά)
π§ ARGUMENTS π§
nbin(PLINT(3plplot), input) β the number of bins. Basically the number of values living in thexandyvectors, so like, keep those consistent bestie.x(PLFLT_VECTOR(3plplot), input) β a vector holding the values associated with the bins. And once again for the people in the back: these must form a strictly increasing sequence π no exceptions, no chaos.y(PLFLT_VECTOR(3plplot), input) β a vector holding a number which is proportional to the number of points in each bin. Note the glow-up: this is aPLFLTvector and not aPLINTvector, and that's on purpose β it's so you can do histograms of probabilities and stuff like that. Iconic, flexible, we love her πopt(PLINT(3plplot), input) β a combination of several flags, and here's the full rundown:opt=PL_BIN_DEFAULT: thexvalues represent the lower bin boundaries, the outer bins are expanded to fill up the entire x-axis, and bins of zero height are simply drawn. Default behaviour, no notes.opt=PL_BIN_CENTRED|...: the bin boundaries are placed midway between thexvalues. If the values inxare equally spaced, then the values are the center values of the bins. Cute.opt=PL_BIN_NOEXPAND|...: the outer bins are drawn with equal size as the ones inside. No stretching, everything same size, equal treatment periodt.opt=PL_BIN_NOEMPTY|...: bins with zero height are not drawn β so there's a gap for such bins. Empty bins get left on read π
π AUTHORS π
Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. That's a whole squad of legends, honestly, the way they've been carrying this library π«Άβ¨
π SEE ALSO π
PLplot documentation at http://plplot.sourceforge.net/documentation.php. Go read it, it's giving knowledge π
k bye bestie, go plot some bins β this was PLBIN(3plplot) from the PLplot API manual, 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