I upgraded my requirements from plotly==5.9.0 to plotly==6.3.0 and observed a regression. Markers on the plot disappeared without any error.
Simply put, my code takes a figure as input and plots a dot at the end of each line. Simple reproducible example:
importnumpyasnpimportpandasaspdimportplotly.graph_objsaspgoimportplotly.subplotsnp.random.seed(42)
# random datadates=pd.date_range(start="2025-01-01", periods=3, freq="D")
data=np.random.randn(3, 1)
df=pd.DataFrame(data, index=dates, columns=["value"])
# this is plotted elsewherefig=plotly.subplots.make_subplots()
forcolumnindf.columns:
trace=pgo.Scatter(
x=df.index,
y=df[column],
mode="lines",
)
fig.add_trace(trace)
# take the figure and# render last point of each line using fig.datafori, traceinenumerate(fig.data):
input_x=trace.x[-1]
input_y=trace.y[-1]
print("Input x:", input_x, type(input_x))
print("Input y:", input_y, type(input_y))
fig.add_scatter(
x=(input_x,),
y=(input_y,),
mode="markers+text",
)
print(f"Plotted x value:", fig.data[-1].x)
fig.show()If I run this with different plotly versions I get different type for the timestamp:

With plotly<6, the figure looks like this

With plotly>=6, it looks like this

I am aware that I can convert numpy datetime back to datetime.datetime to fix my problem but why does plotly treat numpy datetime as a unix timestamp? It's not being converted to an actual date and there is no error either.
Simply put I would expect x axis to be a date and not an impossibly large number:
importnumpyasnpimportplotly.subplotsfig=plotly.subplots.make_subplots()
x=np.datetime64('2025-09-26T01:00:00.000000000')
y=1.23fig.add_scatter(
x=(x,),
y=(y,),
mode="markers+text",
)
print(f"Plotted x value:", fig.data[-1].x)
fig.show()
I upgraded my requirements from
plotly==5.9.0toplotly==6.3.0and observed a regression. Markers on the plot disappeared without any error.Simply put, my code takes a figure as input and plots a dot at the end of each line. Simple reproducible example:
If I run this with different plotly versions I get different type for the timestamp:
With plotly<6, the figure looks like this
I am aware that I can convert numpy datetime back to datetime.datetime to fix my problem but why does plotly treat numpy datetime as a unix timestamp? It's not being converted to an actual date and there is no error either.
Simply put I would expect x axis to be a date and not an impossibly large number: