Skip to content

Commit

Permalink
Merge branch 'main' of github.com:cwindolf/dartsort
Browse files Browse the repository at this point in the history
  • Loading branch information
cwindolf committed Dec 6, 2024
2 parents fb2e652 + 6e1da32 commit 535a2db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dartsort/vis/analysis_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def annotated_dendro(
above_threshold_color=0.0,
leaf_labels=None,
annotations_offset_by_n=True,
rotation=45,
):
n = len(Z) + 1
res = dendrogram(
Expand All @@ -69,7 +70,7 @@ def annotated_dendro(
for j, (ic, dc) in enumerate(zip(res["icoord"], res["dcoord"])):
lines[j, :, 0] = ic
lines[j, :, 1] = dc
if dc[1] < 1.0:
if dc[1] < threshold:
colors[j] = glasbey1024[n + j]
else:
colors[j] = above_threshold_color
Expand Down Expand Up @@ -99,7 +100,9 @@ def annotated_dendro(
color=lc,
va="center",
ha="center",
bbox=dict(fc=fc, ec="none", boxstyle="square,pad=0.1"),
rotation=rotation,
rotation_mode="anchor",
bbox=dict(fc=fc, ec="none", boxstyle="square,pad=0."),
)


Expand Down

0 comments on commit 535a2db

Please sign in to comment.