I'm currently trying to plot multiple 2d line plots evenly distributed in a 3d space using plotly.express line_3d. The plot comes out withsome weird lines crossing each slice of data.
I'm using data from a df like this one:
import pandas as pd
df = pd.DataFrame({'Data_Apontamento': {300: Timestamp('2021-01-02 00:00:00'),301: Timestamp('2021-01-02 00:00:00'),302: Timestamp('2021-01-02 00:00:00'),303: Timestamp('2021-01-02 00:00:00'),304: Timestamp('2021-01-03 00:00:00'),306: Timestamp('2021-01-03 00:00:00'),307: Timestamp('2021-01-03 00:00:00')},
'Descricao_Produto': {300: 14,301: 6,302: 11,303: 13,304: 4,306: 2,307: 3},
'Qtde_Apontada': {300: 0.0,301: 0.0,302: 0.0,303: 0.0,304: 0.0,306: 0.0,307: 1.75},
'rolling_mean': {300: 0.0,301: 0.0,302: 0.0,303: 0.0,304: 0.3333333333333333,306: 0.0,307: 3.8214285714285716}})
And I've written the code as such,
import plotly.express as px
fig = px.line_3d(df, x = 'Data_Apontamento', y = 'Descricao_Produto', z = 'rolling_mean', color = 'Descricao_Produto')
fig.write_html(r'graphs\rolling_expre.html')
I can't find any reason for the appearance of those straight lines.