code: def compute_bbox_with_margins(margin, x, y):
      'Helper function to compute bounding box for the plot'
      # set margins
      pos = np.asarray((x, y))
      minxy, maxxy = pos.min(axis=1), pos.max(axis=1)
      xy1 = minxy - margin*(maxxy - minxy)
      xy2 = maxxy + margin*(maxxy - minxy)
      return tuple(xy1), tuple(xy2f compute_bbox_with_margins(margin, x, y):
      'Helper function to compute bounding box for the plot'
      # set margins
      pos = np.asarray((x, y))
      minxy, maxxy = pos.min(axis=1), pos.max(axis=1)
      xy1 = minxy - margin*(maxxy - minxy)
      xy2 = maxxy + margin*(maxxy - minxy)
      return tuple(xy1), tuple(xy2)
docs: Helper function to compute bounding box for the plot