Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Change the width of the box and points in Plotly express .box

Hello all,

I am using right now plotly express for some Box and Whisket plots. I’d like to change the thickness of the boxes and the points, as they are too thick:

Formerly in plotly.graph_objs, I was doing this by the following command:

def plot_adder(y_data, name, color):
    adder = fig.add_trace(go.Box(
        y= y_data,
        name= name,
        boxmean=True,
        jitter=0.3,
        pointpos=-1.8,
        boxpoints='all', # represent all points
        marker_color= color,
        line_color= color,
        marker_size=3.5,
        line_width=1.1
    ))
    
    return adder

As you can see, the argument line_width and marker_size allowed me to control the thickness of the points and boxes’ margins.

And now, I’d like to do the same, but with plotly express. For the moment, I have the following:

fig = px.box(df_aircelle, x="Model_name", y="MCC", color="Model_name",
             notched=True, # used notched shape
             title="MCC by model",
             points = 'all'
            )

fig.show()

I was reading the documentation for plotly.express.box, but I can’t find these thickness arguments. Could somebody help me?

Thank you in advance.