I can't seem to find the argument to always display the scatter y values above the points in python plotly.
I tried to search for it and failed. I just want something like that hover number to always be on.
Do you need something similar to this in the docs? https://plotly.com/python/line-and-scatter/#connected-scatterplots
import plotly.express as px
df = px.data.gapminder().query("country in ['Canada', 'Botswana']")
fig = px.scatter(
df, x="lifeExp", y="gdpPercap", color="country", text="year"
).update_traces(textposition="top center")
fig.show()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.