Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
greenlablib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
greenlab
greenlablib
Commits
042a4881
Commit
042a4881
authored
1 year ago
by
Arseny Rybnikov
Browse files
Options
Downloads
Patches
Plain Diff
add drawGraph func
parent
000c35eb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+7
-2
7 additions, 2 deletions
README.md
gplot.py
+16
-0
16 additions, 0 deletions
gplot.py
with
23 additions
and
2 deletions
README.md
+
7
−
2
View file @
042a4881
...
...
@@ -27,7 +27,12 @@ The `greenlablib` module is a python module intends to simplify ROOT based routi
>>> pl.drawBinContent(D[0],D[1]) # SetBinContent reimplementation
```
#### TGraph drawGraph(npoints,xarr,yarr,name='g',title='graph')
```
>>> pl.drawGraph(D[-1],D[0],D[1]) # TGraph reimplementation
```
### Math functions:
## float getMuErr(stat,mu):
## float getMuErrNoise(stat,mu,dcr=0,gate=1):
##
## float getMuErr(stat,mu):
##
## float getMuErrNoise(stat,mu,dcr=0,gate=1):
This diff is collapsed.
Click to expand it.
gplot.py
+
16
−
0
View file @
042a4881
...
...
@@ -89,3 +89,19 @@ def drawBinContent(bin_arr,val_arr,name='h',title='histo',nbins=100,bin_first=0,
h
.
SetLineWidth
(
2
)
h
.
Draw
(
""
)
return
h
def
drawGraph
(
npoints
,
xarr
,
yarr
,
name
=
'
g
'
,
title
=
'
graph
'
):
'''
Implements the TGraph ROOT method
'''
xarr
=
cd
(
xarr
)
yarr
=
cd
(
yarr
)
g
=
TGraph
(
npoints
,
xarr
,
yarr
)
g
.
SetNameTitle
(
name
,
title
)
g
.
GetYaxis
().
SetMaxDigits
(
3
);
g
.
SetMarkerStyle
(
20
);
g
.
SetMarkerSize
(
0.6
);
g
.
SetMarkerColor
(
4
);
g
.
Draw
(
"
AP
"
)
return
g
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