def xy(a):
  """Returns arrays of x,y coords for plotting as bars."""
  x = []
  y = []
  #x = [-.5]
  #y = [0.]
  for idx, val in enumerate(a):
    x.append(idx - .5)
    y.append(val)
    x.append(idx + .5)
    y.append(val)
  #x.append(len(a) - .5)
  #y.append(0)
  return x,y