egttools.plotting.helpers.perturb_state

perturb_state(state, perturbation=0.01)[source]

Produces a number of points in the simplex close to the state.

If the sate is a vertex or in an edge, the perturbation is only made across the edges (we don’t look for points in the interior of the simplex).

Parameters
  • state (Union[Tuple[float, float, float], numpy.ndarray]) – Barycentric coordinates of a point inside the simplex.

  • perturbation (float) – The amount of perturbation to apply to the point.

Returns

A list of points (in barycentric coordinates) which are close to the state in the simplex.

Return type

List[numpy.ndarray]