✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Unexpected, strange horizontal lines through line graph

I am seeing some horizontal fragmentation in my graphs and I am wondering what is the source of it, my code or the data. At first I thought it was dates out of order but even with the dates column converted to a time series dataframe and sorted by date the graphs look exactly the same suggesting that the dates were never out of order. Has anyone seen this before? it is affecting all of my graphs.

My code:

import Data as d

import plotly

import chart_studio.plotly as py

import plotly.graph_objs as go

import chart_studio

import plotly.io as pio

from outliers import smirnov_grubbs as grubbs

data_var = d.Data()

trace1 = go.Scatter(

x=data_var.get_julian_date(),

y=grubbs.test(data_var.get_Ar(), alpha=0.99),

xaxis='x1',

yaxis='y1',

marker=go.scatter.Marker(

    color='rgb(26, 118, 255)'

),

line_shape='spline',

line_smoothing = 1.3,

)

data = [trace1]

layout = go.Layout(

plot_bgcolor='#f6f7f8',

paper_bgcolor='#f6f7f8',

title=go.layout.Title(

    text=data_var.Ar,

    xref='paper',

    font=dict(

        family='Open Sans, sans-serif',

        size=22,

        color='#000000'

    )

),

xaxis=go.layout.XAxis(

    title=go.layout.xaxis.Title(

        text='Julian Date',

        font=dict(

            family='Open Sans, sans-serif',

            size=18,

            color='#000000'

        )

    )

),

yaxis=go.layout.YAxis(

    showexponent='all',

    exponentformat='e',

    title=go.layout.yaxis.Title(

        text='Ar',

        font=dict(

            family='Open Sans, sans-serif',

            size=18,

            color='#000000'

        )

    )

)

)

fig = go.Figure(data=data, layout=layout)

#py.plot(fig, filename=‘Ar’)

pio.write_html(fig, file=‘Ar.html’, auto_open=True)

It definitely seems like some of your dates are out of order… can you share some sample data?