type t = | Point | Pixel | Circle | TriangleDown | TriangleUp | TriangleLeft | TriangleRight | Custom of string exception Invalid_marker_length let of_string s = if String.length s <> 1 then raise Invalid_marker_length else Custom s let pp formatter n = (match n with | Point -> "." | Pixel -> "," | Circle -> "o" | TriangleDown -> "v" | TriangleUp -> "^" | TriangleLeft -> ">" | TriangleRight -> "<" | Custom s -> s) |> Format.fprintf formatter "%s"