Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
np
nptool
Commits
65f83901
Commit
65f83901
authored
9 years ago
by
adrien-matta
Browse files
Options
Downloads
Patches
Plain Diff
* Adding an optional nptool style for figures in root
parent
f6dd67d9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPLib/scripts/NPToolLogon.C
+9
-2
9 additions, 2 deletions
NPLib/scripts/NPToolLogon.C
NPLib/scripts/Style_nptool.C
+82
-0
82 additions, 0 deletions
NPLib/scripts/Style_nptool.C
with
91 additions
and
2 deletions
NPLib/scripts/NPToolLogon.C
+
9
−
2
View file @
65f83901
...
...
@@ -49,13 +49,20 @@ std::string LOGON_LIB_EXTENSION = ".so";
#endif
void
NPToolLogon
(){
//#include "Style_nptool.C"
void
NPToolLogon
(){
// Create the NPTool Stype
TString
NPLPath
=
gSystem
->
Getenv
(
"NPTOOL"
);
gROOT
->
ProcessLine
(
Form
(
".x %s/NPLib/scripts/Style_nptool.C"
,
NPLPath
.
Data
()));
// Change the standard random generator to TRandom2
gRandom
=
new
TRandom2
();
TString
currentpath
=
gSystem
->
Getenv
(
"PWD"
);
TString
path
=
gSystem
->
Getenv
(
"NPTOOL"
);
// Add include path
gROOT
->
ProcessLine
(
Form
(
".include %s/NPLib/include"
,
path
.
Data
()));
...
...
This diff is collapsed.
Click to expand it.
NPLib/scripts/Style_nptool.C
0 → 100644
+
82
−
0
View file @
65f83901
#include
"TStyle.h"
#include
"TColor.h"
void
Style_nptool
(){
//-----------------------------------
// standardised nptool root style
// produce minimalist publication ready
// outlook with nptool color scheme
//-----------------------------------
TStyle
*
style_nptool
=
new
TStyle
(
"nptool"
,
"style_nptool"
);
//General
style_nptool
->
SetFrameFillColor
(
kWhite
);
style_nptool
->
SetFrameBorderMode
(
0
);
style_nptool
->
SetFrameLineColor
(
kBlack
);
style_nptool
->
SetStatColor
(
kWhite
);
style_nptool
->
SetFillColor
(
kWhite
);
style_nptool
->
SetTitleFillColor
(
kWhite
);
// Canvas
style_nptool
->
SetCanvasColor
(
kWhite
);
style_nptool
->
SetCanvasDefH
(
800
);
style_nptool
->
SetCanvasDefW
(
800
);
style_nptool
->
SetCanvasBorderMode
(
0
);
// Pad
style_nptool
->
SetPadBottomMargin
(
0
.
15
);
style_nptool
->
SetPadLeftMargin
(
0
.
15
);
style_nptool
->
SetPadTopMargin
(
0
.
05
);
style_nptool
->
SetPadRightMargin
(
0
.
10
);
style_nptool
->
SetPadBorderMode
(
0
);
style_nptool
->
SetPadBorderSize
(
1
);
style_nptool
->
SetPadColor
(
kWhite
);
style_nptool
->
SetPadTickX
(
1
);
style_nptool
->
SetPadTickY
(
1
);
// Desable stat title and fit
style_nptool
->
SetOptStat
(
0
);
style_nptool
->
SetOptTitle
(
0
);
style_nptool
->
SetOptFit
(
0
);
// x axis
style_nptool
->
SetTitleXSize
(
0
.
06
);
style_nptool
->
SetTitleXOffset
(
1
.
0
);
style_nptool
->
SetLabelOffset
(
0
.
1
,
"X"
);
style_nptool
->
SetLabelSize
(
0
.
04
,
"X"
);
style_nptool
->
SetLabelOffset
(
0
.
006
,
"X"
);
// y axis
style_nptool
->
SetTitleYSize
(
0
.
06
);
style_nptool
->
SetTitleYOffset
(
1
.
1
);
style_nptool
->
SetLabelOffset
(
0
.
1
,
"Y"
);
style_nptool
->
SetLabelSize
(
0
.
04
,
"Y"
);
style_nptool
->
SetLabelOffset
(
0
.
006
,
"Y"
);
// z axis
style_nptool
->
SetLabelSize
(
0
.
04
,
"Z"
);
style_nptool
->
SetLabelOffset
(
0
.
006
,
"Z"
);
// Histogramm
style_nptool
->
SetHistLineColor
(
kAzure
+
7
);
style_nptool
->
SetHistFillStyle
(
1001
);
style_nptool
->
SetHistFillColor
(
kAzure
+
7
);
style_nptool
->
SetMarkerColor
(
kOrange
+
7
);
style_nptool
->
SetMarkerStyle
(
20
);
style_nptool
->
SetLineColor
(
kOrange
+
7
);
style_nptool
->
SetLineWidth
(
2
);
style_nptool
->
SetFuncColor
(
kOrange
+
7
);
style_nptool
->
SetFuncWidth
(
2
);
style_nptool
->
SetTitlePS
(
"nptool"
);
const
UInt_t
Number
=
4
;
Double_t
Red
[
Number
]
=
{
0
,
0
.
22
,
0
.
5
*
0
,
0
};
Double_t
Green
[
Number
]
=
{
0
,
0
.
22
,
0
.
5
*
0
.
8
,
0
.
8
};
Double_t
Blue
[
Number
]
=
{
0
,
0
.
22
,
0
.
5
*
1
.
00
,
1
.
00
};
Double_t
Length
[
Number
]
=
{
0
,
0
.
5
,
0
.
5
,
1
.
00
};
Int_t
nb
=
255
;
TColor
::
CreateGradientColorTable
(
Number
,
Length
,
Red
,
Green
,
Blue
,
nb
);
style_nptool
->
SetNumberContours
(
99
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment