Having issues populating my graph after returning data from function

    Output("scat", "figure"),
    [Input("select-xaxis", "value"),
     Input("select-yaxis", "value"),
     Input("select-zaxis", "value"),
     Input("select-species", "value"),
     Input('studies', 'value'),
     Input('foams', 'value'),
     Input('surfactants', 'value'),
     Input('additives', 'value'),
     Input('lp', 'value')],
def update_scat(selected_x, selected_y, selected_z, selected_species, st, fo, sur, add, lp):
    c = dv[dv['Study'].isin(st)]
    le = c[c['Foam'].isin(fo)]
    an = le[le['Surfactant'].isin(sur)]
    ed = an[an['Additive'].isin(add)]
    cleaned = ed[ed['LiquidPhase'].isin(lp)]

    fig = [go.Figure(data=go.Scatter(x=cleaned[selected_x].to_numpy(),
                                mode = 'markers',
                                marker = {
                                text="Study: " + cleaned.Study + "<br />Foam: " + cleaned.Foam + "<br />Surfactant: " + cleaned.Surfactant + "<br />Additive: " + cleaned.Additive + "<br />Liquid Phase: " + cleaned.LiquidPhase,))]

    return  {"data": fig,
            "layout": go.Layout(
                xaxis={"title": f"{selected_x.title()}"}, 
                yaxis={"title": f"{selected_y.title()}"}, )

Above is my code. I am creating a 2-d scatter plot from within a tab, when I use fig.show() in my return statement it works (but gives me an error of course). With the above code, I get an empty plot. I have tried changing around my x and y axes, but to no avail. I have a 3d graph in another tab, so I know the data/variables used work. Please let me know if you see the problem.