summaryrefslogtreecommitdiff
path: root/big
diff options
context:
space:
mode:
Diffstat (limited to 'big')
-rw-r--r--big/logpdf.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/big/logpdf.py b/big/logpdf.py
new file mode 100644
index 0000000..67dee21
--- /dev/null
+++ b/big/logpdf.py
@@ -0,0 +1,23 @@
+
+import matplotlib.pyplot as plt
+import numpy as np
+from scipy.stats import norm, poisson
+
+
+# fig, axes = plt.subplots(1, 2)
+# x = list(range(10))
+# axes[0].plot(x, norm.logpdf(x, loc=5, scale=2), 'r-', lw=2, alpha=0.6, label='norm logpdf')
+# axes[0].legend()
+# axes[1].plot(x, poisson.logpmf(x, mu=0.6), 'b-', lw=2, alpha=0.6, label='poisson logpmf')
+# axes[1].legend()
+# # plt.legend()
+# plt.show()
+
+fig, axes = plt.subplots(1, 2)
+x = list(range(10))
+axes[0].plot(x, norm.pdf(x, loc=5, scale=2), 'r-', lw=2, alpha=0.6, label='norm pdf')
+axes[0].legend()
+axes[1].plot(x, poisson.pmf(x, mu=0.6), 'b-', lw=2, alpha=0.6, label='poisson pmf')
+axes[1].legend()
+# plt.legend()
+plt.show() \ No newline at end of file