I am working on a plot that has four subplots, with multiple traces on each. Plotly is a great solution for me because we have lots of data to show and having tooltips to call out specific data points is very useful using x unified
hovermode. However, with so many traces the tooltip can get rather large; sometimes I want to be able to turn off tooltips using a button.
I was able to work something out using the updatemenus
option in the layout a la:
updatemenus=[
dict(
type = "dropdown",
direction = "down",
buttons=list([
dict(
args=["hovermode", "x unified" ],
label="On",
method="relayout"
),
dict(
args=["hovermode", False ],
label="Off",
method="relayout"
),
]),
pad={"r": 10, "t": 10},
showactive=True,
x=1.05,
xanchor="right",
y=1.07,
yanchor="top"
),
]
However, the buttons are rather large and donβt fit well, and Iβd rather have a toggle button in the modebar as a cleaner solution.
It seems like this would be trivial to do in js, but I cannot get anything to work in python. I can see from the docs that there this a default toggleHover
button available to the modebar config, but I cannot get it to show up. Does anyone know why it may not be showing up?