Created
October 29, 2020 14:17
-
-
Save chyld/fb02cf437ac5d4ccf50e9a5105c01213 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def plot_uniform(start, order_of_magnitude, rows, cols, *colors): | |
| fig = plt.figure(figsize=(12, 7)) | |
| for i in range(1, order_of_magnitude + 1): | |
| samples = start ** i | |
| vals, counts = np.unique(randint(low=1, high=7).rvs(samples), return_counts=True) | |
| ax = fig.add_subplot(rows, cols, i) | |
| ax.bar(vals, counts, color=colors[i-1], alpha=0.7) | |
| ax.set_title("{} samples".format(samples)) | |
| plt.suptitle('Dice Rolls', fontsize=50) | |
| fig.tight_layout() |
Author
chyld
commented
Oct 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment