def filter_stupid_characters(string):
    """
    Delete and replace stupid characters to save the figure

    Parameters
    ----------
    string: title of the plot to be changed into the filename

    Returns
    -------
    cleaned string
    """
    for char in [',', '$', '\\', ' ', '__', '___']:
        string = string.replace(char, '')
    if string.startswith('_'):
        string = string[1:-1]
    return string
