Padding on x axis with scatter plot, mode parameter - markers vs lines

I am plotting wind speed and wind direction, both using the same code (see below), a scatter plot with direction plotted with markers and speed with lines. The different uses (‘markers’ vs ‘lines’) of the mode parameter results in padding (or no padding) at the to the left and right of the x axis (see examples). How can I get these to be the same? The incoming_data is a pandas dataframe.

# declare figure
fig = go.Figure()

# add traces to figure
for c001 in columns:
    fig.add_trace(go.Scatter(x=incoming_data.index, y=incoming_data[c001],
                    mode=modeis,
                    name=c001))

)
 
# Configure figure layout
fig['layout'].update(

                     yaxis=dict(showgrid=True,
                                showline=True,
                                gridcolor='#bdbdbd',
                                gridwidth=1,
                                range=[plot_range[0],plot_range[1]],
                                tick0=0,
                                dtick=plot_range[2]),

                     xaxis=dict(showgrid=True,
                                showline=True,
                                gridcolor='#bdbdbd',
                                gridwidth=1),

                     width=1500,
                     height=600, 
                     #margin=dict(l=50,r=50,b=50,t=50,pad=4)            
                     title = title_str, 
                     plot_bgcolor =  '#FFFFFF'

                    )

# save figure to html
fig.write_html(save_filename + '.html')

WIND SPEED

WIND DIRECTION