3 ms·
Without reading the post, I read this as make a histogram with 6 bins in range –1 to 2 with name x. Then sort data into the histogram. What I don’t understand i
by nxpnsv 8y ago
Without reading the post, I read this as make a histogram with 6 bins in range –1 to 2 with name x. Then sort data into the histogram. What I don’t understand is the relevance of x, or why not just have a h.fill() function.
- olq_plo 8y agoLabels are metadata. You can attach arbitrary metadata to each axis or no metadata at all. The metadata is sometimes useful to keep track what each axis range was representing. For example, if you load a serialized histogram into your program that someone else generated. Here is an example which demonstrates the usefulness of labels: https://raw.githubusercontent.com/boostorg/histogram/develop/examples/guide_axis_with_labels.cpp https://raw.githubusercontent.com/boostorg/histogram/develop... The design choice of using operator() or a fill() method was hotly debated. In the bigger picture of things, operator() is better because then 1D histogram have the same fill syntax as the accumulators from Boost::accumulators.