Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fastNLO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
qcd-public
fastNLO
Commits
977a5f99
Commit
977a5f99
authored
6 months ago
by
Klaus Rabbertz
Browse files
Options
Downloads
Patches
Plain Diff
Drop python2 stuff in plotting script
parent
97675a29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/plotting/fastnnlo_statunc.py
+14
-13
14 additions, 13 deletions
tools/plotting/fastnnlo_statunc.py
with
14 additions
and
13 deletions
tools/plotting/fastnnlo_statunc.py
+
14
−
13
View file @
977a5f99
#!/usr/bin/env python3
#!/usr/bin/env python3
#-*- coding:utf-8 -*-
#
-*- coding:utf-8 -*-
#
#
########################################################################
########################################################################
#
#
...
@@ -9,10 +9,13 @@
...
@@ -9,10 +9,13 @@
#
#
########################################################################
########################################################################
#
#
# python2 compatibility
# fastNLO for direct evaluation of interpolation grids
from
__future__
import
absolute_import
# ATTENTION: fastNLO python extension is required for Python 3!
from
__future__
import
division
from
fastnlo
import
SetGlobalVerbosity
from
__future__
import
print_function
from
fastnlo
import
fastNLOLHAPDF
import
fastnlo
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
argparse
import
argparse
import
glob
import
glob
import
os
import
os
...
@@ -22,7 +25,8 @@ import sys
...
@@ -22,7 +25,8 @@ import sys
import
timeit
import
timeit
import
matplotlib
as
mpl
import
matplotlib
as
mpl
import
matplotlib.gridspec
as
gridspec
import
matplotlib.gridspec
as
gridspec
from
matplotlib.ticker
import
(
FormatStrFormatter
,
LogFormatter
,
NullFormatter
,
ScalarFormatter
,
AutoMinorLocator
,
MultipleLocator
)
from
matplotlib.ticker
import
(
FormatStrFormatter
,
LogFormatter
,
NullFormatter
,
ScalarFormatter
,
AutoMinorLocator
,
MultipleLocator
)
from
matplotlib
import
cm
from
matplotlib
import
cm
# We do not want any interactive plotting! Figures are saved to files instead.
# We do not want any interactive plotting! Figures are saved to files instead.
# This also avoids the ANNOYANCE of frequently missing Tkinter/tkinter (python2/3) GUI backends!
# This also avoids the ANNOYANCE of frequently missing Tkinter/tkinter (python2/3) GUI backends!
...
@@ -56,20 +60,17 @@ else:
...
@@ -56,20 +60,17 @@ else:
useagg
=
True
useagg
=
True
try
:
try
:
mpl
.
use
(
backend
,
force
=
True
)
mpl
.
use
(
backend
,
force
=
True
)
print
(
'
[fastnnlo_statunc]: Warning! Could not import cairo backend :-( Using agg instead for raster plots only!
'
)
print
(
'
[fastnnlo_statunc]: Warning! Could not import cairo backend :-( Using agg instead for raster plots only!
'
)
except
:
except
:
useagg
=
False
useagg
=
False
print
(
'
[fastnnlo_statunc]: Can not use agg backend :-(
'
)
print
(
'
[fastnnlo_statunc]: Can not use agg backend :-(
'
)
raise
ImportError
(
'
[fastnnlo_statunc]: Neither cairo nor agg backend found :-( Cannot produce any plots. Good bye!
'
)
raise
ImportError
(
'
[fastnnlo_statunc]: Neither cairo nor agg backend found :-( Cannot produce any plots. Good bye!
'
)
mpl
.
use
(
'
agg
'
)
mpl
.
use
(
'
agg
'
)
import
matplotlib.pyplot
as
plt
# numpy
# numpy
import
numpy
as
np
# fastNLO for direct evaluation of interpolation grids
# fastNLO for direct evaluation of interpolation grids
# ATTENTION: fastNLO python extension is required for Python 3!
# ATTENTION: fastNLO python extension is required for Python 3!
import
fastnlo
from
fastnlo
import
fastNLOLHAPDF
from
fastnlo
import
SetGlobalVerbosity
#import warnings
#import warnings
#warnings.filterwarnings("error")
#warnings.filterwarnings("error")
...
...
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