Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
dumux-repositories
dumux
Commits
73500cbb
Commit
73500cbb
authored
7 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[postprocessing] Add option to set a white background color and to give a title
parent
7e47579c
No related branches found
No related tags found
2 merge requests
!600
[WIP][components][plotproperties] Add a source file to plot properties of some components
,
!510
[postprocessing] Add pvpython script to export 2d screenshots
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/postprocessing/exportscreenshot2d.py
+23
-0
23 additions, 0 deletions
bin/postprocessing/exportscreenshot2d.py
with
23 additions
and
0 deletions
bin/postprocessing/exportscreenshot2d.py
+
23
−
0
View file @
73500cbb
...
@@ -44,8 +44,11 @@ parser.add_argument('-pt', '--parameterType', choices=parameterType, default='CE
...
@@ -44,8 +44,11 @@ parser.add_argument('-pt', '--parameterType', choices=parameterType, default='CE
parser
.
add_argument
(
'
-lo
'
,
'
--legendOrientation
'
,
choices
=
legendOrientation
,
default
=
'
Horizontal
'
,
help
=
'
The name of the parameter to be plotted
'
)
parser
.
add_argument
(
'
-lo
'
,
'
--legendOrientation
'
,
choices
=
legendOrientation
,
default
=
'
Horizontal
'
,
help
=
'
The name of the parameter to be plotted
'
)
parser
.
add_argument
(
'
-lp
'
,
'
--legendPosition
'
,
type
=
float
,
nargs
=
2
,
default
=
[
0.25
,
0.0
],
help
=
'
The position of the legend
'
)
parser
.
add_argument
(
'
-lp
'
,
'
--legendPosition
'
,
type
=
float
,
nargs
=
2
,
default
=
[
0.25
,
0.0
],
help
=
'
The position of the legend
'
)
parser
.
add_argument
(
'
-lz
'
,
'
--legendZoom
'
,
type
=
float
,
nargs
=
2
,
default
=
[
0.5
,
0.5
],
help
=
'
The zoom of the legend
'
)
parser
.
add_argument
(
'
-lz
'
,
'
--legendZoom
'
,
type
=
float
,
nargs
=
2
,
default
=
[
0.5
,
0.5
],
help
=
'
The zoom of the legend
'
)
parser
.
add_argument
(
'
-lt
'
,
'
--legendTitle
'
,
default
=
''
,
help
=
"
Title of the legend
"
)
parser
.
add_argument
(
'
-lct
'
,
'
--legendComponentTitle
'
,
default
=
'
none
'
,
help
=
"
Title of the legend component
"
)
parser
.
add_argument
(
'
--size
'
,
type
=
int
,
nargs
=
2
,
default
=
[
600
,
400
],
help
=
"
The pixel size of the png file (default: 600x400)
"
)
parser
.
add_argument
(
'
--size
'
,
type
=
int
,
nargs
=
2
,
default
=
[
600
,
400
],
help
=
"
The pixel size of the png file (default: 600x400)
"
)
parser
.
add_argument
(
'
--scale
'
,
type
=
float
,
nargs
=
3
,
default
=
[
1.0
,
1.0
,
1.0
],
help
=
"
Scaling factors in each direction
"
)
parser
.
add_argument
(
'
--scale
'
,
type
=
float
,
nargs
=
3
,
default
=
[
1.0
,
1.0
,
1.0
],
help
=
"
Scaling factors in each direction
"
)
parser
.
add_argument
(
'
--whiteBackground
'
,
dest
=
'
whiteBackground
'
,
action
=
'
store_true
'
,
help
=
"
Sets a white background
"
)
parser
.
add_argument
(
'
-v
'
,
'
--verbosity
'
,
type
=
int
,
default
=
2
,
help
=
'
Verbosity of the output
'
)
parser
.
add_argument
(
'
-v
'
,
'
--verbosity
'
,
type
=
int
,
default
=
2
,
help
=
'
Verbosity of the output
'
)
args
=
vars
(
parser
.
parse_args
())
args
=
vars
(
parser
.
parse_args
())
...
@@ -148,6 +151,26 @@ for curFile in args['files']:
...
@@ -148,6 +151,26 @@ for curFile in args['files']:
legend
.
Position2
=
args
[
'
legendZoom
'
]
legend
.
Position2
=
args
[
'
legendZoom
'
]
legend
.
Orientation
=
args
[
'
legendOrientation
'
]
legend
.
Orientation
=
args
[
'
legendOrientation
'
]
# rename the legend if desired
if
args
[
'
legendTitle
'
]
!=
''
:
legend
.
Title
=
args
[
'
legendTitle
'
]
if
args
[
'
legendComponentTitle
'
]
!=
'
none
'
:
legend
.
ComponentTitle
=
args
[
'
legendComponentTitle
'
]
# set a white background color and black color for fonts and the grid
if
args
[
'
whiteBackground
'
]
==
True
:
renderView1
.
Background
=
[
255
,
255
,
255
]
legend
.
TitleColor
=
[
0.0
,
0.0
,
0.0
]
legend
.
LabelColor
=
[
0.0
,
0.0
,
0.0
]
if
args
[
'
showAxesGrid
'
]
==
True
:
renderView1
.
AxesGrid
.
GridColor
=
[
0.0
,
0.0
,
0.0
]
renderView1
.
AxesGrid
.
XTitleColor
=
[
0.0
,
0.0
,
0.0
]
renderView1
.
AxesGrid
.
YTitleColor
=
[
0.0
,
0.0
,
0.0
]
renderView1
.
AxesGrid
.
ZTitleColor
=
[
0.0
,
0.0
,
0.0
]
renderView1
.
AxesGrid
.
XLabelColor
=
[
0.0
,
0.0
,
0.0
]
renderView1
.
AxesGrid
.
YLabelColor
=
[
0.0
,
0.0
,
0.0
]
renderView1
.
AxesGrid
.
ZLabelColor
=
[
0.0
,
0.0
,
0.0
]
# current camera placement for renderView1
# current camera placement for renderView1
renderView1
.
InteractionMode
=
'
2D
'
renderView1
.
InteractionMode
=
'
2D
'
#renderView1.CameraPosition = [5.0, 0.12345, 0.0]
#renderView1.CameraPosition = [5.0, 0.12345, 0.0]
...
...
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