Hello all,
I have an issue which I just can’t seem to figure out.
I have a plot like this:
… and I’ve created a log-log model in an external script.
When I add a Scatter trace to the data, I get a bunch of unwanted line connections:
I’m creating the trace like this:
curve = go.Scatter(
x=sl.population,
y=sl.fit,
marker=go.Marker(color='red'),
name='Fit',
line=dict(shape='spline')
)
Where sl
is a Pandas DataFrame.
And the scatter points line this:
scatter = go.Scatter(
x=sl.population,
y=sl.y,
mode='markers',
marker=go.Marker(color='#3D3C28'),
name=ylab,
hoverinfo=hoverinfo,
text=names,
)
I’m passing these values into a function which I use regularly to create a scatterplots like the ones shown here but with linear trendlines.
So the straighline version of the model works fine, but for some reason I’m having trouble overlaying non-linear curves…
So, how do I create a plot like the one below, but with a red line instead of a series of red dots?