Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sean Leavey
pykat
Commits
fa2cff03
Commit
fa2cff03
authored
9 years ago
by
Andreas Freise
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.aei.uni-hannover.de:finesse/pykat
parents
f8bb0250
c3881794
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pykat/finesse.py
+31
-6
31 additions, 6 deletions
pykat/finesse.py
with
31 additions
and
6 deletions
pykat/finesse.py
+
31
−
6
View file @
fa2cff03
...
...
@@ -288,7 +288,8 @@ class katRun(object):
def
plot
(
self
,
detectors
=
None
,
filename
=
None
,
show
=
True
,
yaxis
=
None
,
legend
=
True
,
loc
=
0
,
title
=
None
,
styles
=
None
,
ylabel
=
None
,
y2label
=
None
,
xlabel
=
None
,
x2label
=
None
):
ylabel
=
None
,
y2label
=
None
,
xlabel
=
None
,
x2label
=
None
,
xlim
=
None
,
x2lim
=
None
,
ylim
=
None
,
y2lim
=
None
):
"""
This will generate a plot for the output data of this particular pykat run.
It will attempt to generate a plot that shows all the various traces and plots
...
...
@@ -310,6 +311,11 @@ class katRun(object):
value being a colour and linestyle of the sort
'
k:
'
ylabel, xlabel: Text for the first plot x and y labels
y2label, x2label: Text for the second plot x and y labels
xlim, ylim: Limits of x- and y-axes of the first plot. List or tuple
of length 2.
x2lim, y2lim: Limits of x- and y-axes of the second plot. List or tuple
of length 2.
"""
import
matplotlib.pyplot
as
pyplot
import
pykat.plotting
as
plt
...
...
@@ -409,10 +415,21 @@ class katRun(object):
if
y2label
is
None
:
if
"
deg
"
in
kat
.
yaxis
:
y2label
=
"
Phase [deg]
"
if
"
im
"
in
kat
.
yaxis
:
y2label
=
"
Imaginary part [au]
"
if
xlim
is
None
:
xlim
=
(
self
.
x
.
min
(),
self
.
x
.
max
())
if
x2lim
is
None
:
x2lim
=
(
self
.
x
.
min
(),
self
.
x
.
max
())
else
:
if
ylabel
is
None
:
ylabel
=
"
[au]
"
if
xlim
is
None
:
xlim
=
(
self
.
x
.
min
(),
self
.
x
.
max
())
if
xlabel
is
None
:
xlabel
=
self
.
xlabel
...
...
@@ -424,16 +441,22 @@ class katRun(object):
if
dual_plot
:
ax
=
pyplot
.
subplot
(
2
,
1
,
1
)
pyplot
.
xlabel
(
xlabel
,
fontsize
=
font_label_size
)
pyplot
.
xlim
(
self
.
x
.
min
(),
self
.
x
.
max
())
pyplot
.
ylabel
(
ylabel
,
fontsize
=
font_label_size
)
pyplot
.
xlim
(
xlim
[
0
],
xlim
[
1
])
if
ylim
is
not
None
:
pyplot
.
ylim
(
ylim
[
0
],
ylim
[
1
])
if
title
is
not
None
:
pyplot
.
title
(
title
,
fontsize
=
font_label_size
)
pyplot
.
subplot
(
2
,
1
,
2
)
pyplot
.
xlabel
(
x2label
,
fontsize
=
font_label_size
)
pyplot
.
xlim
(
self
.
x
.
min
(),
self
.
x
.
max
())
pyplot
.
ylabel
(
y2label
,
fontsize
=
font_label_size
)
pyplot
.
xlim
(
x2lim
[
0
],
x2lim
[
1
])
if
y2lim
is
not
None
:
pyplot
.
ylim
(
y2lim
[
0
],
y2lim
[
1
])
else
:
pyplot
.
xlabel
(
xlabel
,
fontsize
=
font_label_size
)
pyplot
.
ylabel
(
ylabel
)
...
...
@@ -441,6 +464,8 @@ class katRun(object):
if
title
is
not
None
:
pyplot
.
title
(
title
,
fontsize
=
font_label_size
)
if
ylim
is
not
None
:
pyplot
.
ylim
(
ylim
[
0
],
ylim
[
1
])
pyplot
.
tight_layout
()
...
...
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