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 those n data 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 interval xmin to xmax into.
  • 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 with opt=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