Skip to content

5. Decorating arrangements

Lluís Alemany Puig edited this page Jan 29, 2022 · 1 revision

Assigning labels to vertices

Besides modifying the positions of arrangements, we can also label the vertices with something more meaningful than just their indices. In the current version of this ipelet, the user can label the vertices with strings, the only restriction for which is that they should not contain spaces. For example, we can label the vertices of a star graph given with the head vector 0 1 1 1 1 with the first five letters of the Latin alphabet, a b c d e.

Since this is IPE, the text is going to be rendered in LaTeX eventually so we can use dollars to enclose Greek letters $\alpha$ $\beta$ $\delta$ $\gamma$ $\epsilon$.

Spacing labelled vertices properly

In case we want to use longer strings and avoid the foreseeable overlapping problems

we can check the "Use automatic spacing" checkbox in the ipelet to avoid these overlapping problems

Furthermore, the arcs are always oriented so that arrows point from parent to child,

The arrows are not added by the Ipelet, but they can be added as it is usually done in IPE.

Coloring the vertices

Further, vertices can be painted in two different colours (red and green -- hardcoded). This is specially useful for bipartite graphs. In case the graph is not bipartite, this will not produce a valid graph colouring (as in Graph Theory, a valid colouring of a graph is one in which no two adjacent vertices are assigned the same colour). For example, the input

produced the output