Skip to content

Commit 32acd28

Browse files
author
Christopher Rogan
committed
fixed HistPlot 1D plot formatting
1 parent efe2f86 commit 32acd28

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

examples/example_Wlnu.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/////////////////////////////////////////////////////////////////////////
22
// RestFrames: particle physics event analysis library
33
// --------------------------------------------------------------------
4-
// Copyright (c) 2014-2016, Christopher Rogan
4+
// Copyright (c) 2014-2018, Christopher Rogan
55
/////////////////////////////////////////////////////////////////////////
66
///
77
/// \file example_Wlnu.C

inc/RestFrames/RFBase.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/////////////////////////////////////////////////////////////////////////
22
// RestFrames: particle physics event analysis library
33
// --------------------------------------------------------------------
4-
// Copyright (c) 2014-2016, Christopher Rogan
4+
// Copyright (c) 2014-2018, Christopher Rogan
55
/////////////////////////////////////////////////////////////////////////
66
///
77
/// \file RFBase.hh

inc/RestFrames/RestFrame.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/////////////////////////////////////////////////////////////////////////
22
// RestFrames: particle physics event analysis library
33
// --------------------------------------------------------------------
4-
// Copyright (c) 2014-2016, Christopher Rogan
4+
// Copyright (c) 2014-2018, Christopher Rogan
55
/////////////////////////////////////////////////////////////////////////
66
///
77
/// \file RestFrame.hh

src/HistPlot.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/////////////////////////////////////////////////////////////////////////
22
// RestFrames: particle physics event analysis library
33
// --------------------------------------------------------------------
4-
// Copyright (c) 2014-2016, Christopher Rogan
4+
// Copyright (c) 2014-2018, Christopher Rogan
55
/////////////////////////////////////////////////////////////////////////
66
///
77
/// \file HistPlot.cc
@@ -365,7 +365,7 @@ namespace RestFrames {
365365
}
366366
}
367367

368-
hists[imax]->Draw();
368+
hists[imax]->Draw("HIST");
369369
hists[imax]->GetXaxis()->SetTitle(XLabel.c_str());
370370
hists[imax]->GetXaxis()->SetTitleOffset(1.27);
371371
hists[imax]->GetXaxis()->CenterTitle();
@@ -399,7 +399,7 @@ namespace RestFrames {
399399
hists[i]->SetLineWidth(3);
400400
hists[i]->SetMarkerColor(icolor0);
401401
hists[i]->SetMarkerSize(0);
402-
hists[i]->Draw("same");
402+
hists[i]->Draw("HIST same");
403403
}
404404

405405
TLatex l(0.6,0.943,m_PlotTitle.c_str());

src/RFPlot.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/////////////////////////////////////////////////////////////////////////
22
// RestFrames: particle physics event analysis library
33
// --------------------------------------------------------------------
4-
// Copyright (c) 2014-2015, Christopher Rogan
4+
// Copyright (c) 2014-2018, Christopher Rogan
55
/////////////////////////////////////////////////////////////////////////
66
///
77
/// \file RFPlot.cc
@@ -99,6 +99,7 @@ namespace RestFrames {
9999

100100
void SetStyle(bool invert_colors){
101101
// For the canvas:
102+
102103
gStyle->SetCanvasBorderMode(0);
103104
gStyle->SetCanvasColor(kWhite);
104105
gStyle->SetCanvasDefX(0);
@@ -155,6 +156,7 @@ namespace RestFrames {
155156
// put tick marks on top and RHS of plots
156157
gStyle->SetPadTickX(1);
157158
gStyle->SetPadTickY(1);
159+
158160

159161
double zcolor_s[5] = { 0.00, 0.50, 0.70, 0.82, 1.00 };
160162
double zcolor_r[5] = { 0.00, 0.00, 0.74, 1.00, 1.00 };

src/RestFrame.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/////////////////////////////////////////////////////////////////////////
22
// RestFrames: particle physics event analysis library
33
// --------------------------------------------------------------------
4-
// Copyright (c) 2014-2016, Christopher Rogan
4+
// Copyright (c) 2014-2018, Christopher Rogan
55
/////////////////////////////////////////////////////////////////////////
66
///
77
/// \file RestFrame.cc

0 commit comments

Comments
 (0)