def format_data(shapelet, offset=0.0):
  """
  Prints a shapelet in a formatted way so that it can be visualized with
  other tools afterwards. The formatted shapelet is returned as a string
  by this function.
  """

  data = ""
  for x,y in enumerate(shapelet):
    data += "{}\t{}\n".format(x+offset,y)

  data += "\n"
  return data