I’d have expected to be able to include the customdata (list/pandas series) into the hovertemplate, but this is not appearing as intended. The literal text %{customdata}
appears instead.
import plotly.graph_objects as go
import numpy as np
import pandas as pd
x = np.random.randn(500)
y = np.random.randn(500) + 1
z = np.random.randn(500) + 2
a = np.random.randn(500) + 4
fig1 = go.Figure(
go.Histogram2d(
x=x,
y=y,
z=z,
customdata=a,
hovertemplate="%{a[0]}"
)
)
fig1.show()