mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
18 lines
388 B
C++
18 lines
388 B
C++
//[ guide_axis_with_labels
|
|
|
|
#include <boost/histogram.hpp>
|
|
|
|
namespace bh = boost::histogram;
|
|
|
|
int main() {
|
|
// create a 2d-histogram with an "age" and an "income" axis
|
|
auto h = bh::make_static_histogram(
|
|
bh::axis::regular<>(20, 0, 100, "age in years"),
|
|
bh::axis::regular<>(20, 0, 100, "yearly income in $1000")
|
|
);
|
|
|
|
// do something with h
|
|
}
|
|
|
|
//]
|