def set_ylabel(N, coordinates, id_number, flag, plotParams):
    """
    Sets the appropriate y-axis label according to the object being plotted
    
    N: number of points along y-axis (>= 1)
    coordinates: location of object being referenced on y-axis (only used if N == 1)
    id_number: the number of the object being plotted (e.g., 'Receiver 1')
    flag: string parameter describing the type of the object ('data', 'impulse', 'left', or 'right')
    plotParams: a dictionary of the plot parameters for styling
    """
    if flag == 'data' or flag == 'impulse' or flag == 'left':
        ylabel = 'Receiver'
    elif flag == 'right':
        ylabel = 'Source'
    if N == 1:
        au = plotParams['au']
        if coordinates is not None:
            xu = plotParams['xu']
            yu = plotParams['yu']
            if coordinates.shape[1] == 2:
                if au != '' and xu != '' and yu != '':
                    ylabel = (
                        'Amplitude (%s) [%s %s @ (%0.2f %s, %0.2f %s)]' % (
                        au, ylabel, id_number, coordinates[0, 0], xu,
                        coordinates[0, 1], yu))
                elif au == '' and xu != '' and yu != '':
                    ylabel = 'Amplitude [%s %s @ (%0.2f %s, %0.2f %s)]' % (
                        ylabel, id_number, coordinates[0, 0], xu,
                        coordinates[0, 1], yu)
                elif au != '' and xu == '' and yu == '':
                    ylabel = 'Amplitude (%s) [%s %s @ (%0.2f, %0.2f)]' % (au,
                        ylabel, id_number, coordinates[0, 0], coordinates[0, 1]
                        )
                elif au == '' and xu == '' and yu == '':
                    ylabel = 'Amplitude [%s %s @ (%0.2f, %0.2f)]' % (ylabel,
                        id_number, coordinates[0, 0], coordinates[0, 1])
            elif coordinates.shape[1] == 3:
                zu = plotParams['zu']
                if au != '' and xu != '' and yu != '' and zu != '':
                    ylabel = (
                        'Amplitude (%s) [%s %s @ (%0.2f %s, %0.2f %s, %0.2f %s)]'
                         % (au, ylabel, id_number, coordinates[0, 0], xu,
                        coordinates[0, 1], yu, coordinates[0, 2], zu))
                elif au == '' and xu != '' and yu != '' and zu != '':
                    ylabel = (
                        'Amplitude [%s %s @ (%0.2f %s, %0.2f %s, %0.2f %s)]' %
                        (ylabel, id_number, coordinates[0, 0], xu,
                        coordinates[0, 1], yu, coordinates[0, 2], zu))
                elif au != '' and xu == '' and yu == '' and zu == '':
                    ylabel = (
                        'Amplitude (%s) [%s %s @ (%0.2f, %0.2f, %0.2f)]' %
                        (au, ylabel, id_number, coordinates[0, 0],
                        coordinates[0, 1], coordinates[0, 2]))
                elif au == '' and xu == '' and yu == '' and zu == '':
                    ylabel = 'Amplitude [%s %s @ (%0.2f, %0.2f, %0.2f)]' % (
                        ylabel, id_number, coordinates[0, 0], coordinates[0,
                        1], coordinates[0, 2])
        elif au != '':
            ylabel = 'Amplitude (%s) [%s %s]' % (au, ylabel, id_number)
        else:
            ylabel = 'Amplitude [%s %s]' % (ylabel, id_number)
    return ylabel
