multilines function

Draw lines for groups distinguished by a factor