spmviz.data.format_pattern#
- spmviz.data.format_pattern(p, style='arrow', labels=None)[source]#
Format a pattern as text.
- Parameters:
- p
pattern - style{“arrow”, “ascii”, “angle”, “compact”, “spmf”, “underscore”}
"arrow":a → b → (c, d);"ascii":a -> b -> (c,d);"angle":⟨a b (cd)⟩;"compact":a b (c d);"spmf":1 -1 2 -1;"underscore":a_b_c(notation of the NbVFS paper).- labels
mapping,optional Display names of the items.
- p
Examples
>>> format_pattern((("a",), ("b", "c"))) 'a → (b, c)' >>> format_pattern((("a",), ("b", "c")), "angle") '⟨a (bc)⟩'