I can't find how to plot these two series A and B with time on X.
from numpy import linspace
import polars as pl
import plotly.express as px
import plotly.io as pio
pio.renderers.default = 'browser'
times = linspace(1, 6, 10)
df = pl.DataFrame({
'time': times,
'A': times**2,
'B': times**3,
})
fig = px.line(df)
fig.show()
Data keep showing as 10 series with 3 points, instead of 2 series with 10 points and the first column as X values.
Edit:
This line:
fig = px.line(df, x='time', y=['A', 'B'])
produces this error:
ValueError: Value of 'x' is not the name of a column in 'data_frame'. Expected one of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] but received: time
Using polars 0.15.0 and plotly 5.11.0

