def group_names(names):
    """
    Group names of signals by similarity of name.

    First all numbers are removed from the signal name. Then identical
    numberless signal names are grouped together.

    This function is used to cluster line on a plot.

    Parameters
    ----------
    names : :obj:`list` of :obj:`str`
        names of the signals to group.

    Returns
    -------
    grouped_names : :obj:`dict` of :obj:`list` of :obj:`str`
        Dictionary with the name without numbers as key and all signal names
        with numbers as list items.

    """
    grouped_names = {}
    for name in names:
        # Remove all numbers from signal name
        name_without_numbers = "".join(i for i in name if not i.isdigit())
        if name_without_numbers in grouped_names.keys():
            grouped_names[name_without_numbers].append(name)
        else:
            grouped_names[name_without_numbers] = [name]

    return grouped_names