Plotly Express Lowess Trendline Produces Incorrect Results

I have recently implemented a LOWESS trendline using Plotly express when I noticed it didn’t look quite right.

Replicating the example from the docs does not appear to produce the trendline as shown in the screenshot.

If we do this manually using LOWESS directly from statsmodels and then plotting it using Plotly we get the trendline that matches the screenshot in the docs. Green is the manually produced trendline. Blue is the Plotly express LOWESS trend line. They both use a fraction of 0.1.

import as px
import plotly.graph_objects as go
import pandas as pd
import numpy as np
import statsmodels.api as sm

df =
lowess = sm.nonparametric.lowess
z = lowess(df['GOOG'],df['date'],frac=0.1)

fig = px.scatter(df, x="date", y="GOOG", trendline="lowess", trendline_options=dict(frac=0.1))


Any idea what’s going on here or if I am doing something wrong?

Plotly 5.4.0
statsmodels 0.13.1
Python 3.7.11