Skip to content

plot_pool_weights score annotation can spill past the axis for weights near 1 #166

Description

@thomaspinder

Context

Found during review of #164 (issue #151). plot_pool_weights places the per-model score annotation at w + 1% with xlim max(1, 1.05*w).

Problem

A long annotation (e.g. log score -1,234.5) overflows the right axis when a model's weight is near 1.

Suggested approach

Clip the annotation position, or place the text inside the bar when the bar occupies most of the axis.

Affected files

  • src/impulso/plotting/_pooling.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions