Skip to content

Instantly share code, notes, and snippets.

@rahulbhadani
Created May 25, 2022 03:47
Show Gist options
  • Save rahulbhadani/17e25e80195a5c1f2016d7b64e5cd280 to your computer and use it in GitHub Desktop.
Save rahulbhadani/17e25e80195a5c1f2016d7b64e5cd280 to your computer and use it in GitHub Desktop.
Uniform Distribution U[0, 2]
import numpy as np
import matplotlib.pyplot as plt
import seaborn as s
import matplotlib as mpl
import pyplot_themes as themes
themes.theme_solarized(scheme="dark", grid=False, ticks=False,)
mpl.rcParams['font.family'] = 'Serif'
A = np.random.uniform(low = 0, high = 2, size = 10000)
s.set_context('talk')
s.distplot(A)
plt.xlabel('x')
plt.ylabel('f(x)')
plt.title('U[0, 2]\n')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment