<jupyter_start><jupyter_text>Distribution Plots, or Distplots, typically layer three plots on top to eachone.- a Histogram, where each data point is placed inside a bin of similar values- The second is a rug plot - marjs are placed along the x-axis for every datapoint, which lets you see the distribution of values inside each bin- a 'Kernel density estimate' of KDE line that tries to describe the shape of the distribution<jupyter_code>x = np.random.randn(1000)
hist_data = [x]
group_labels = ['distplot']

fig = ff.create_distplot(hist_data=hist_data, group_labels=group_labels)
fig.show()
x1 = np.random.randn(200) - 2
x2 = np.random.randn(200)
x3 = np.random.randn(200) +2
x4 = np.random.randn(200) +4

hist_data = [x1, x2, x3, x4]
group_labels = ['x1', 'x2', 'x3', 'x4']

fig = ff.create_distplot(hist_data=hist_data, group_labels=group_labels, bin_size=[.2,.1,.3,.4])
fig.show()
'''
Lets visualize the Snodgrass and Twain example
'''

snodgrass = [.209, .205, .196, .210, .202, .207, .224, .223, .220, .201]
twain = [.225, .262, .217, .240, .230, .229, .235, .217]

hist_data = [snodgrass, twain]
group_labels = ['Snodgrass', 'Twain']

fig = ff.create_distplot(hist_data, group_labels, bin_size=[0.005, 0.005])
fig.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14455917394757745, 'fraction_numerical': 0.07704527402700556, 'mean_word_length': 4.8604651162790695, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '199108', 'license': 'MIT', 'n_tokens_mistral': 537, 'n_tokens_neox': 471, 'n_words': 142, 'path': 'Plotly/Distplots.ipynb', 'repo_name': 'jorge-garciadiego/Visualization-Dash', 'size': '1259'}