Skip to content

Commit dc66862

Browse files
committed
[hist] Fix more code examples with RRegularAxis
More examples I missed in commit 943ee82 ("Accept regular axis interval as std::pair") and follow-up commit f76ad48.
1 parent 28a1a9e commit dc66862

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

hist/histv7/inc/ROOT/RBinIndexRange.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The interface allows convenient iteration over RBinIndex. If included, RBinIndex
2828
normal bins and RBinIndex::Overflow() is the last value.
2929
3030
\code
31-
ROOT::Experimental::RRegularAxis axis(10, 0, 1);
31+
ROOT::Experimental::RRegularAxis axis(10, {5, 15});
3232
for (auto index : axis.GetNormalRange(2, 5)) {
3333
// Will iterate over [2, 3, 4]
3434
}

hist/histv7/inc/ROOT/RHist.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ An object can have arbitrary dimensionality determined at run-time. The axis con
5151
RAxisVariant:
5252
\code
5353
std::vector<ROOT::Experimental::RAxisVariant> axes;
54-
axes.push_back(ROOT::Experimental::RRegularAxis(10, 5, 15));
54+
axes.push_back(ROOT::Experimental::RRegularAxis(10, {5, 15}));
5555
axes.push_back(ROOT::Experimental::RVariableBinAxis({1, 10, 100, 1000}));
5656
ROOT::Experimental::RHist<int> hist(axes);
5757
// hist.GetNDimensions() will return 2

hist/histv7/inc/ROOT/RHistEngine.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ An object can have arbitrary dimensionality determined at run-time. The axis con
5757
RAxisVariant:
5858
\code
5959
std::vector<ROOT::Experimental::RAxisVariant> axes;
60-
axes.push_back(ROOT::Experimental::RRegularAxis(10, 5, 15));
60+
axes.push_back(ROOT::Experimental::RRegularAxis(10, {5, 15}));
6161
axes.push_back(ROOT::Experimental::RVariableBinAxis({1, 10, 100, 1000}));
6262
ROOT::Experimental::RHistEngine<int> hist(axes);
6363
// hist.GetNDimensions() will return 2

0 commit comments

Comments
 (0)