-
-
Save zredlined/9d34ae832845b6a856cfce5049f93684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.figure_factory as ff | |
import numpy as np | |
# Add histogram data | |
x1 = np.random.randn(500) - 2 | |
x2 = np.random.randn(500) | |
x3 = np.random.randn(500) + 2 | |
x4 = np.random.randn(500) + 4 | |
# Group data together | |
hist_data = [x1, x2, x3, x4] | |
group_labels = ['Group 1', 'Group 2', 'Group 3', 'Group 4'] | |
# Create distplot with custom bin_size | |
fig = ff.create_distplot(hist_data, group_labels, bin_size=.2) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment