guide_axis_with_labels.cpp 568 B

123456789101112131415161718192021
  1. // Copyright 2015-2018 Hans Dembinski
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt
  5. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //[ guide_axis_with_labels
  7. #include <boost/histogram.hpp>
  8. int main() {
  9. using namespace boost::histogram;
  10. // create a 2d-histogram with an "age" and an "income" axis
  11. auto h = make_histogram(axis::regular<>(20, 0.0, 100.0, "age in years"),
  12. axis::regular<>(20, 0.0, 100.0, "yearly income in Thousands"));
  13. // do something with h
  14. }
  15. //]