Skip to content

Commit

Permalink
label,
Browse files Browse the repository at this point in the history
  • Loading branch information
StFroese committed Dec 14, 2024
1 parent eb8462a commit 2aad9b4
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions titrate/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__(
self.ax.set_yscale("log")
self.ax.set_xlim(0, max_ts)

self.ax.set_ylabel("pdf")
self.ax.set_ylabel(r"$f(\tilde{q}_\mu\vert\mu^\prime,\theta_{\mu,\text{obs}})$")
self.ax.set_xlabel(rf"${statistic_math_name}$")
self.ax.set_title(statistic.__class__.__name__)
self.ax.legend()
Expand All @@ -207,21 +207,15 @@ def plot(
density=True,
histtype="step",
color="C0",
label=(
rf"$f({statistic_math_name}\vert\mu^\prime)$, "
r"$\mu=1$, $\mu^\prime=0$"
),
label=(r"$\mu=1$, $\mu^\prime=0$"),
)
plt.hist(
toys_ts_same,
bins=bins,
density=True,
histtype="step",
color="C1",
label=(
rf"$f({statistic_math_name}\vert\mu^\prime)$, "
r"$\mu=1$, $\mu^\prime=1$"
),
label=(r"$\mu=1$, $\mu^\prime=1$"),
)

plt.plot(
Expand All @@ -230,12 +224,12 @@ def plot(
poi_val=1, same=False, poi_true_val=0, ts_val=linspace
),
color="C0",
label=rf"$f({statistic_math_name}\vert\mu^\prime)$, asympotic",
label=r"$\mu=1$, $\mu^\prime=0$",
)
plt.plot(
linspace,
statistic.asympotic_approximation_pdf(poi_val=1, ts_val=linspace),
color="C1",
alpha=0.3,
label=rf"$f({statistic_math_name}\vert\mu^\prime)$, asympotic",
ls="--",
label=r"$\mu=1$, $\mu^\prime=1$",
)

0 comments on commit 2aad9b4

Please sign in to comment.