added option to join lines within colour grouping or not