File size: 534 Bytes
dd0ef30
9c1ffe9
 
 
dd0ef30
9c1ffe9
dd0ef30
 
 
 
 
 
 
 
 
 
9c1ffe9
dd0ef30
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import numpy as np
import plotly.figure_factory as ff
import streamlit as st


@st.cache_data
def load_data():
    # Add histogram data
    x1 = np.random.randn(200) - 2
    x2 = np.random.randn(200)
    x3 = np.random.randn(200) + 2

    # Group data together
    hist_data = [x1, x2, x3]
    return hist_data


hist_data = load_data()

group_labels = ["Group 1", "Group 2", "Group 3"]

# Create distplot with custom bin_size
fig = ff.create_distplot(hist_data, group_labels, bin_size=[0.1, 0.25, 0.5])

# Plot!
st.plotly_chart(fig)