def METHOD_NAME(xcorr_type, filename, jcurrent_selection, station_id, event_type, juser_id):
    if filename is None or station_id is None or xcorr_type is None:
        return {}
    user_id = json.loads(juser_id)
    nurio = provider.get_file_handler(user_id, filename)
    fig = plotly.subplots.make_subplots(rows=1, cols=1)
    keys = nurio.get_header()[station_id].keys()
    if event_type == 'nu':
        if stnp.nu_xcorrelations not in keys:
            return {}
        xcorrs = nurio.get_header()[station_id][stnp.nu_xcorrelations]
    else:
        if stnp.cr_xcorrelations not in keys:
            return {}
        xcorrs = nurio.get_header()[station_id][stnp.cr_xcorrelations]
    if stnp.station_time in keys:
        times = []
        for time in nurio.get_header()[station_id][stnp.station_time]:
            times.append(time.value)
        current_selection = json.loads(jcurrent_selection)
        fig.append_trace(plotly.graph_objs.Scatter(
            x=times,
            y=[xcorrs[i][xcorr_type] for i in range(len(xcorrs))],
            text=[str(x) for x in nurio.get_event_ids()],
            customdata=[x for x in range(nurio.get_n_events())],
            mode='markers',
            opacity=1,
            selectedpoints=current_selection
        ), 1, 1)
    else:
        return {}
    fig['layout'].update(default_layout)
    fig['layout']['yaxis'].update({'title': xcorr_type, 'range': [0, 1]})
    fig['layout']['hovermode'] = 'closest'
    return fig