Skip to content

Commit

Permalink
Mark02 limit y axis rhat combined (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonkoehn authored Sep 5, 2023
1 parent 789ea7c commit 2d23c33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pyggdrasil/visualize/_mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,15 @@ def save_rhat_iteration_AD_DL(
ax.set_xlabel("Iteration") # type: ignore
# get name of distance measure
ax.set_ylabel(r"$\hat{R}$") # type: ignore
ax.set_ylim(0.8, 5.0) # type: ignore
ax.plot(iteration, rhats_AD, color="darkgreen", label="AD") # type: ignore
ax.plot(iteration, rhats_DL, color="darkorange", label="DL") # type: ignore
# specifying horizontal line type
# see limits https://arxiv.org/pdf/1903.08008.pdf
plt.axhline(y=1.1, color="b", linestyle="--", linewidth=0.5) # type: ignore
plt.axhline(y=1.01, color="r", linestyle="-", linewidth=0.5) # type: ignore
ax.tick_params(axis="y", labelcolor="black") # type: ignore
ax.set_yticks([1, 2, 3, 4, 5]) # type: ignore
ax.legend(loc="upper right") # type: ignore
# ensure the output directory exists
# strip the filename from the output path
Expand Down
1 change: 1 addition & 0 deletions workflows/visualize.smk
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ rule plot_rhat_AD_DL:
plot="{DATADIR}/{experiment}/plots/{mcmc_config_id}/{mutation_data_id}/{base_tree_id}/AD_DL/rhat4-MCMCseeds_s{mcmc_seed1}_s{mcmc_seed2}_s{mcmc_seed3}_s{mcmc_seed4}-iTrees_i{init_tree_id1}_i{init_tree_id2}_i{init_tree_id3}_i{init_tree_id4}/rhat.svg",
run:
# load AD
change = 1 # nonsense change so that this rule is rerun 05/09/23
in_fp = Path(input.rhat_AD)
with open(in_fp) as f:
data_AD = json.load(f)
Expand Down

0 comments on commit 2d23c33

Please sign in to comment.