enter image description hereI am havin trouble with an error (or something) in my plotly graph.
I want to display time series data with horizontal and vertical lines only. My problem is that this works for some data sets and not for others. I use the command fig.update_traces(connectgaps=True,line_shape=’hv’) to connect the points of the graph and achieve the desired effect. Figure 1 shows the data set for which this works without problems, Figure 3 shows the problem graph. Figures 2 and 4 show the data sources without “connectgaps=True”.
The graphs are generated by a for loop and are identical. the origin of the different data is from the same time period from two identical machines
Do you guys mabye know what the reason for the beahvouir of “connectgaps” is?
The datalogger can not be the source of the problem, since the code is identical on the machine and the logger is logging data from all machines
I can not reproduce the problem using the following code:
import plotly.express as px
x = [1, 2, 3, 4, 5]
y = [1, 3, None, 4, 2]
fig = px.line(x=x, y=y)
fig.update_traces(connectgaps=True,line_shape='hv')
fig.add_trace(px.scatter(x=y, y=y).data[0])
fig.show()
That is basically what I do to create the plot
jmbec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.