# Unable to use restyle in order to change the trace args

I have a function in dash which looks like this

``````    fig = px.scatter(data_frame=agg,
x = agg["DateTime"],
y = agg["P"],
color = agg["C"],
marginal_y="box",
marginal_x="histogram",
hover_name=agg["V"],
height=600,
title="X Distribution")
``````

Currently the fig generated has arg `color` set to a column named `C` .
I want to use

The below code is from above link

``````fig.update_layout(
type = "buttons",
direction = "left",
buttons=list([
dict(
args=["type", "surface"],
label="3D Surface",
method="restyle"
),
dict(
args=["type", "heatmap"],
label="Heatmap",
method="restyle"
)
]),
How do I use `restyle` to change my arg `color` ?