Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
359d82ec
Commit
359d82ec
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
prepare for kwargs
parent
1e2fe7f9
No related branches found
No related tags found
1 merge request
!763
Normalization to maximum value supported in core and applied to ff/pyramid4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/ff/bornplot2.py
+5
-5
5 additions, 5 deletions
Examples/ff/bornplot2.py
with
5 additions
and
5 deletions
Examples/ff/bornplot2.py
+
5
−
5
View file @
359d82ec
...
...
@@ -34,7 +34,7 @@ def save_results(namedResults, name):
class
MultiPlot
:
def
__init__
(
self
,
n
,
ncol
):
def
__init__
(
self
,
n
,
ncol
,
**
kwargs
):
self
.
n
=
n
self
.
ncol
=
ncol
self
.
nrow
=
1
+
(
self
.
n
-
1
)
//
self
.
ncol
...
...
@@ -88,11 +88,11 @@ class MultiPlot:
fontsize
=
self
.
fontsize
)
def
make_plot_row
(
namedResults
,
name
):
make_plot
(
namedResults
,
name
,
len
(
namedResults
))
def
make_plot_row
(
namedResults
,
name
,
**
kwargs
):
make_plot
(
namedResults
,
name
,
len
(
namedResults
)
,
**
kwargs
)
def
make_plot
(
namedResults
,
name
,
ncol
):
def
make_plot
(
namedResults
,
name
,
ncol
,
**
kwargs
):
"""
Make a plot consisting of one detector image for each Result in results,
plus one common color scale.
...
...
@@ -102,7 +102,7 @@ def make_plot(namedResults, name, ncol):
:param name: Filename for multiplot during save
:param ncol: Number of columns in multiplot
"""
multiPlot
=
MultiPlot
(
len
(
namedResults
),
ncol
)
multiPlot
=
MultiPlot
(
len
(
namedResults
),
ncol
,
**
kwargs
)
# Always the same color scale, to facilitate comparisons between figures.
norm
=
mpl
.
colors
.
LogNorm
(
1e-8
,
1
)
...
...
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