Outputting legend

Signed-off-by: Bjørn Johansen <post@bjornjohansen.no>