Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
grond
Commits
43cde556
Commit
43cde556
authored
Mar 02, 2017
by
Sebastian Heimann
Browse files
disable ellipse plotting in jointpar figures
parent
fb6bcd56
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plot.py
View file @
43cde556
...
...
@@ -319,7 +319,7 @@ def draw_sequence_figures(model, plt, misfit_cutoff=None, sort_by='iteration'):
def
draw_jointpar_figures
(
model
,
plt
,
misfit_cutoff
=
None
,
ibootstrap
=
None
,
color
=
None
,
exclude
=
None
,
include
=
None
):
exclude
=
None
,
include
=
None
,
draw_ellipses
=
False
):
color
=
'misfit'
# exclude = ['duration']
...
...
@@ -499,17 +499,18 @@ def draw_jointpar_figures(
c
=
color
,
s
=
msize
,
alpha
=
0.5
,
cmap
=
cmap
,
edgecolors
=
'none'
)
cov
=
num
.
cov
((
xpar
.
scaled
(
fx
),
ypar
.
scaled
(
fy
)))
evals
,
evecs
=
eigh_sorted
(
cov
)
evals
=
num
.
sqrt
(
evals
)
ell
=
patches
.
Ellipse
(
xy
=
(
num
.
mean
(
xpar
.
scaled
(
fx
)),
num
.
mean
(
ypar
.
scaled
(
fy
))),
width
=
evals
[
0
]
*
2
,
height
=
evals
[
1
]
*
2
,
angle
=
num
.
rad2deg
(
num
.
arctan2
(
evecs
[
1
][
0
],
evecs
[
0
][
0
])))
ell
.
set_facecolor
(
'none'
)
axes
.
add_artist
(
ell
)
if
draw_ellipses
:
cov
=
num
.
cov
((
xpar
.
scaled
(
fx
),
ypar
.
scaled
(
fy
)))
evals
,
evecs
=
eigh_sorted
(
cov
)
evals
=
num
.
sqrt
(
evals
)
ell
=
patches
.
Ellipse
(
xy
=
(
num
.
mean
(
xpar
.
scaled
(
fx
)),
num
.
mean
(
ypar
.
scaled
(
fy
))),
width
=
evals
[
0
]
*
2
,
height
=
evals
[
1
]
*
2
,
angle
=
num
.
rad2deg
(
num
.
arctan2
(
evecs
[
1
][
0
],
evecs
[
0
][
0
])))
ell
.
set_facecolor
(
'none'
)
axes
.
add_artist
(
ell
)
fx
=
problem
.
extract
(
xref
,
jpar
)
fy
=
problem
.
extract
(
xref
,
ipar
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment