Skip to content

Commit f1e7125

Browse files
hahnjodpiparo
authored andcommitted
[hist] Improve hist001 tutorial
Show macro output, clarify comments and axis interval types.
1 parent e76402a commit f1e7125

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tutorials/hist/histv7/hist001_RHist_basics.C

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/// Basics of RHist, including filling and adding them.
55
///
66
/// \macro_code
7+
/// \macro_output
78
///
89
/// \date September 2025
910
/// \author The ROOT Team
@@ -17,7 +18,7 @@
1718
#include <random>
1819
#include <variant>
1920

20-
// It is currently not possible to directly draw RHist's, so this function implements an output with ASCII characters.
21+
// It is currently not possible to directly draw an RHist, so this function implements an output with ASCII characters.
2122
static void DrawHistogram(const ROOT::Experimental::RHist<int> &hist)
2223
{
2324
// Get the axis object from the histogram.
@@ -56,9 +57,9 @@ static void DrawHistogram(const ROOT::Experimental::RHist<int> &hist)
5657
void hist001_RHist_basics()
5758
{
5859
// Create an axis that can be used for multiple histograms.
59-
ROOT::Experimental::RRegularAxis axis(40, {0, 20});
60+
ROOT::Experimental::RRegularAxis axis(40, {0.0, 20.0});
6061

61-
// Create a first histograms and fill with random values.
62+
// Create a first histogram and fill with random values.
6263
ROOT::Experimental::RHist<int> hist1({axis});
6364

6465
// Create a normal distribution with mean 5.0 and stddev 2.0.

tutorials/hist/histv7/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\defgroup tutorial_histv7 Histogram tutorials
1+
\defgroup tutorial_histv7 RHist tutorials
22
\ingroup tutorial_hist
33

44
Examples demonstrating ROOT's histogram package.

0 commit comments

Comments
 (0)