I would like to modify the hovertemplate of a plotly histogram. So far, couldn't find a way to: Round the values given Remove the name of the histograms (here: '2012', '2013') Add a name to indicate what the values represent
Desired hovertext:
Bin-range: -1.24, 3.31
or
Even better alternative (range with hyphen):
Bin-range: -1.24 - 3.31
Any ideas?
import plotly.figure_factory as ff
import numpy as np
import pandas as pd
df = pd.DataFrame({'2012': np.random.randn(200),
'2013': np.random.randn(200)+1})
fig = ff.create_distplot([df[c] for c in df.columns],
df.columns, bin_size=.25, show_rug=False)
fig.show()
