From 761bf7412ab9b8e34bc0cfa4b34cbec2ec10bfe9 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 25 Jun 2026 10:31:36 +0800 Subject: [PATCH] maps: drop society label leader-lines (draw_lines=False) The textalloc leader lines made a spider-web across the map; 2-letter ISO codes are short enough to sit beside their dot with only a small overlap-avoidance nudge. Cleaner, less ink, label stays next to its point in almost all cases. Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com> --- src/tinymfv/maps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tinymfv/maps.py b/src/tinymfv/maps.py index 8938626..5bdc5cc 100644 --- a/src/tinymfv/maps.py +++ b/src/tinymfv/maps.py @@ -216,8 +216,11 @@ def plot_ipsative_pca(instr: Instrument, dims: list[str], countries: list[str], ax.scatter(P[:, 0], P[:, 1], s=26, c=C_HUM, alpha=0.7, edgecolors="white", linewidths=0.5, zorder=3) if ta is not None: try: + # draw_lines=False: 2-letter ISO codes sit beside their dot (textalloc only nudges to avoid + # label-label overlap), no leader-line spider-web -- the small displacement keeps each code + # unambiguously next to its point in almost all cases. ta.allocate_text(fig, ax, P[:, 0], P[:, 1], countries, x_scatter=P[:, 0], y_scatter=P[:, 1], - textsize=7.5, linecolor="#c2bca8", linewidth=0.5, textcolor="#555555") + textsize=7.5, textcolor="#555555", draw_lines=False) except Exception: ta = None if ta is None: