Retrieving actual data points from displot/histogram

Hey @chriddyp!

This is my first post, and sorry if this is a stupid question, but I’ve scoured the boards for an answer and come up with nothing so here goes. Is it possible to display or plot the actual data points along the normal distribution curve itself in the hover window? If not, is it possible to display the data point labels in each bin of a histogram? Specifically, when you hover over a bin, the info window displays a list of the datapoint labels inside that bin. Is this possible with the Dash framework, and if not now, will it be a possible feature in the future?

Thanks!

Welcome to Dash! :slight_smile:

Check out the distplot figure factory: Distplots in Python

To use in Dash, fig will be the figure property of dcc.Graph. Example:

import plotly.figure_factory as ff

import numpy as np

x = np.random.randn(1000)  
hist_data = [x]
group_labels = ['distplot']

fig = ff.create_distplot(hist_data, group_labels)

app.layout = html.Div([
     dcc.Graph(id='my-id', figure=fig)
])