From 94af80beff6c517104de73a2bffc6eaa522344e7 Mon Sep 17 00:00:00 2001 From: Tom Selier Date: Wed, 4 Oct 2023 12:34:36 +0200 Subject: [PATCH] lines --- src/experiments/algorithms/distribution_curve.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/experiments/algorithms/distribution_curve.py b/src/experiments/algorithms/distribution_curve.py index f890e4a..4bda106 100644 --- a/src/experiments/algorithms/distribution_curve.py +++ b/src/experiments/algorithms/distribution_curve.py @@ -25,7 +25,12 @@ def calcNormalFunc(mean, sd, len): f = calcNormalFunc(mean, sd, N) -plt.title("PDF: $\mu = %d$, $\sigma = %d$"%(mean, sd)) +plt.title("PDF: $\mu = %d$, $\sigma = %d$"%(mean, sd)) +plt.vlines(sd+mean, 0, f[mean-sd], colors='orange') +plt.vlines(mean-sd, 0, f[mean-sd], colors='orange', label='$\sigma$') +plt.vlines(2*sd+mean, 0, f[mean-2*sd], colors='green') +plt.vlines(mean-2*sd, 0, f[mean-2*sd], colors='green', label='$2\sigma$') +plt.legend() plt.plot(f) plt.grid() plt.xlim(0, 255)