Update 47: Rewrote pretty printing of graph labels.

I rewrote the pretty printing of graph labels so that there are no
trailing colons and arithmetic expressions are bracketed.