Commit 43cde556 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

disable ellipse plotting in jointpar figures

parent fb6bcd56
...@@ -319,7 +319,7 @@ def draw_sequence_figures(model, plt, misfit_cutoff=None, sort_by='iteration'): ...@@ -319,7 +319,7 @@ def draw_sequence_figures(model, plt, misfit_cutoff=None, sort_by='iteration'):
def draw_jointpar_figures( def draw_jointpar_figures(
model, plt, misfit_cutoff=None, ibootstrap=None, color=None, model, plt, misfit_cutoff=None, ibootstrap=None, color=None,
exclude=None, include=None): exclude=None, include=None, draw_ellipses=False):
color = 'misfit' color = 'misfit'
# exclude = ['duration'] # exclude = ['duration']
...@@ -499,17 +499,18 @@ def draw_jointpar_figures( ...@@ -499,17 +499,18 @@ def draw_jointpar_figures(
c=color, c=color,
s=msize, alpha=0.5, cmap=cmap, edgecolors='none') s=msize, alpha=0.5, cmap=cmap, edgecolors='none')
cov = num.cov((xpar.scaled(fx), ypar.scaled(fy))) if draw_ellipses:
evals, evecs = eigh_sorted(cov) cov = num.cov((xpar.scaled(fx), ypar.scaled(fy)))
evals = num.sqrt(evals) evals, evecs = eigh_sorted(cov)
ell = patches.Ellipse( evals = num.sqrt(evals)
xy=(num.mean(xpar.scaled(fx)), num.mean(ypar.scaled(fy))), ell = patches.Ellipse(
width=evals[0]*2, xy=(num.mean(xpar.scaled(fx)), num.mean(ypar.scaled(fy))),
height=evals[1]*2, width=evals[0]*2,
angle=num.rad2deg(num.arctan2(evecs[1][0], evecs[0][0]))) height=evals[1]*2,
angle=num.rad2deg(num.arctan2(evecs[1][0], evecs[0][0])))
ell.set_facecolor('none')
axes.add_artist(ell) ell.set_facecolor('none')
axes.add_artist(ell)
fx = problem.extract(xref, jpar) fx = problem.extract(xref, jpar)
fy = problem.extract(xref, ipar) fy = problem.extract(xref, ipar)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment