("orange", (6.0, 1.0, 1.5, 1.0)),
    ("black", (None, None)),
]


# ----------------------------------------------------------------------
def getval(v):
    try:
        d = float(v)
    except ValueError:
        d = None
    return d


# ----------------------------------------------------------------------
figure = matplotlibext.Figure()
figure.open(4.5, 4.5, margins=[[0.55, 0.2, 0.1], [0.35, 0.6, 0.1]], dpi=150)

locs = [(-6.0, -9.0), (+6.0, 0.0)]

nrows = 2
ncols = 2

cell = "tet4"
dx = 75
simdirs = []
modelers = [
    ('Barall', "barall"),
    ('Kaneko', "kaneko"),
    ('PyLith', "tet4"),
]
    return


  def getProfile(self, cycle, t):
    dt = self.time[1] - self.time[0]
    tProf = tcycle.value*cycles[icycle]+t*year.value
    iProf = numpy.where(numpy.fabs(self.time-tProf) < 0.5*dt)[0][0]
    t0 = tcycle.value*cycles[icycle]
    i0 = numpy.where(numpy.fabs(self.time-t0) < 0.5*dt)[0][0]
    disp = self.disp[iProf,:] - self.disp[i0,:]
    return (self.dist, disp.squeeze())


# ----------------------------------------------------------------------
figure = matplotlibext.Figure(color=style,fontsize=fontsize)
figure.open(3.0, 5.0, margins=[[0.45, 0.3, 0.2], [0.4, 0.3, 0.12]], dpi=150)


analytic = AnalyticSoln("output/analytic_disp.txt")
import collections

sims = collections.defaultdict(dict)
for r in res:
  for c in cells:
    sims[c][r] = PyLithOutput(c, r)

cycles = [1,9]
snaptime = numpy.array([0.05, 0.25, 0.50, 0.75, 0.95])*tcycle.value/year.value

nrows = 2