Skip to content

Instantly share code, notes, and snippets.

@SaraM92
Last active July 17, 2020 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaraM92/5f792d01eee891ce38e911638f784c3c to your computer and use it in GitHub Desktop.
Save SaraM92/5f792d01eee891ce38e911638f784c3c to your computer and use it in GitHub Desktop.
#Import Essential Libraries
import numpy as np
import matplotlib.pyplot as plt
#Generating Uniform Distribution for a Dice Roll
probs = np.full(6, 1/6)
faces = [1,2,3,4,5,6]
plt.bar(faces, probs, color="#8d0801")
plt.ylabel('Probability', fontsize=15 ,color="#001427")
plt.xlabel('Possible Outcomes', fontsize=15 ,color="#001427")
axes = plt.gca()
axes.set_ylim([0,1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment