Commit fb6bcd56 authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

can now change x axis ordering in sequence plots to 'misfit'

parent 6bc3b1a6
...@@ -164,7 +164,7 @@ class GrondModel(object): ...@@ -164,7 +164,7 @@ class GrondModel(object):
listener() listener()
def draw_sequence_figures(model, plt, misfit_cutoff=None): def draw_sequence_figures(model, plt, misfit_cutoff=None, sort_by='iteration'):
problem = model.problem problem = model.problem
imodels = num.arange(model.nmodels) imodels = num.arange(model.nmodels)
...@@ -182,7 +182,13 @@ def draw_sequence_figures(model, plt, misfit_cutoff=None): ...@@ -182,7 +182,13 @@ def draw_sequence_figures(model, plt, misfit_cutoff=None):
isort = num.argsort(gms)[::-1] isort = num.argsort(gms)[::-1]
imodels = imodels[isort] if sort_by == 'iteration':
imodels = imodels[isort]
elif sort_by == 'misfit':
imodels = num.arange(imodels.size)
else:
assert False
gms = gms[isort] gms = gms[isort]
gms_softclip = gms_softclip[isort] gms_softclip = gms_softclip[isort]
xs = xs[isort, :] xs = xs[isort, :]
......
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