diff --git a/docs/img/wvs/wvs_map_iw.png b/docs/img/wvs/wvs_map_iw.png index 8821a82..29c5a31 100644 Binary files a/docs/img/wvs/wvs_map_iw.png and b/docs/img/wvs/wvs_map_iw.png differ diff --git a/docs/img/wvs/wvs_map_iw.svg b/docs/img/wvs/wvs_map_iw.svg index 17dcc3b..a183bf2 100644 --- a/docs/img/wvs/wvs_map_iw.svg +++ b/docs/img/wvs/wvs_map_iw.svg @@ -6,7 +6,7 @@ - 2026-07-05T17:13:42.697769 + 2026-07-09T15:54:53.577734 image/svg+xml @@ -38,325 +38,330 @@ z " style="fill: #faf8f2"/> - + - + - +" clip-path="url(#p50d840ad4e)" style="fill: none; opacity: 0.9; stroke: #4e79a7; stroke-width: 1.8; stroke-linejoin: miter"/> - +" clip-path="url(#p50d840ad4e)" style="fill: none; opacity: 0.9; stroke: #9c755f; stroke-width: 1.8; stroke-linejoin: miter"/> - +" clip-path="url(#p50d840ad4e)" style="fill: none; opacity: 0.9; stroke: #e15759; stroke-width: 1.8; stroke-linejoin: miter"/> - +" clip-path="url(#p50d840ad4e)" style="fill: none; opacity: 0.9; stroke: #f28e2b; stroke-width: 1.8; stroke-linejoin: miter"/> + + + - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/scripts/wvs_map.py b/scripts/wvs_map.py index 7b9ed74..cd7dd16 100644 --- a/scripts/wvs_map.py +++ b/scripts/wvs_map.py @@ -285,7 +285,9 @@ def main() -> None: # Render through the SHARED value-map renderer (same one the instrument value maps use): pole # signposts through the human median, 4 auto-selected zone hulls, auto-placed labels, model stars. _, emph = zones_for(countries) - # Title + caption live in the README (nicer voice, editable), not baked into the figure. + # The hero map (unlike the instrument maps) bakes on a title + an attribution note carrying the + # repo URL, so copies shared around the web stay credited and self-explanatory. Everything else + # still leans on the README voice. # Drop the " (rated)" readout tag from the on-map labels (the cache/CI-table keep it) -- the map is # crowded and every model here is rated, so the tag adds nothing. plot_models = {k.replace(" (rated)", ""): v for k, v in models.items()} @@ -305,7 +307,9 @@ def main() -> None: fig = maps.plot_value_map( "WVS Inglehart-Welzel", countries, P, ("Survival", "Self-expression", "Traditional", "Secular-Rational"), - models=plot_models, model_labels=model_labels, emphasize=emph) + models=plot_models, model_labels=model_labels, emphasize=emph, + title="Frontier LLMs on the\nWorld Values Survey", + note="17 models, rated sampling\ngithub.com/wassname/moral-maps") fig.savefig(args.out, dpi=200, bbox_inches="tight") logger.info(f"wrote {args.out}") diff --git a/src/moralmaps/maps.py b/src/moralmaps/maps.py index 44277f7..e92d7c7 100644 --- a/src/moralmaps/maps.py +++ b/src/moralmaps/maps.py @@ -369,6 +369,9 @@ def plot_value_map(display: str, countries: list[str], P: np.ndarray, ax.margins(0.17) # roomy edges: the pole signposts sit in the inner ax.autoscale(False) # margin and edge labels (Serbia, Adaptive) need to fit. + if models: # the WVS overlay stacks the most-secular model stars + y0, y1 = ax.get_ylim() # against the top edge; add top headroom so their + ax.set_ylim(y0, y1 + 0.22 * (y1 - y0)) # stars + labels seat INSIDE the frame. -- Claude # Orientation is already baked into the coords (orient_geographic above), so the pixel-space label # allocator sees the final left/right; no ax.invert_xaxis() that would mirror every placed label. # ONE placement pass for everything (see labelplace.allocate_labels). Each zone name is a REGION @@ -403,12 +406,15 @@ def plot_value_map(display: str, countries: list[str], P: np.ndarray, # NO legend: each model family already has a directly-placed, family-coloured label on the map, so a # swatch legend would just duplicate that ink (Tufte eraser test). Grey dots read as societies from # the labelled examples (Sweden, Japan...); the count lives in the README caption. - # Title + caption are OFF by default -- the README carries the headline + sources (nicer voice - # there than baked jargon). Pass title/note only for a standalone figure. + # Title + caption default OFF (the README carries them). When passed (the hero WVS map) draw them + # INSIDE the axes, in the empty bottom-left corner, so a crop of the PNG can't strip the attribution + # and there's no external white band. -- Claude if title: - ax.set_title(title, fontsize=12, loc="left") + ax.text(0.012, 0.075, title, transform=ax.transAxes, ha="left", va="bottom", + fontsize=11, fontweight="bold", color="#333", zorder=11, linespacing=1.05) if note: - fig.text(0.02, 0.015, note, ha="left", va="bottom", fontsize=7.5, color="#999") + ax.text(0.012, 0.02, note, transform=ax.transAxes, ha="left", va="bottom", + fontsize=7.5, color="#8a857a", zorder=11, linespacing=1.1) return fig