Skip to content

Fix vertical scaling of Eisenstein diagrams for p-adic families - #7155

Open
roed-math wants to merge 2 commits into
LMFDB:mainfrom
roed-math:ai/t20-padic-family-diagrams
Open

Fix vertical scaling of Eisenstein diagrams for p-adic families#7155
roed-math wants to merge 2 commits into
LMFDB:mainfrom
roed-math:ai/t20-padic-family-diagrams

Conversation

@roed-math

Copy link
Copy Markdown
Contributor

Closes #6828.

The Eisenstein diagram on p-adic family pages capped its matplotlib aspect ratio at a fixed value of 8 in data coordinates. Since the image is displayed at a fixed width, families with large $e$ and small slopes (all nine examples in the issue) rendered as vertically compressed slivers with overlapping y-axis labels.

This keeps the two existing aspect terms (default shape and minimum label separation) but clamps the physical height:width ratio of the image to $[1/4, 5/4]$ instead of capping the raw aspect.

A survey over all 489,714 stored families with $w>0$ shows no diagram gets shorter, about 2.5% (exactly the compressed ones) grow by more than 5%, and typical families are byte-identical; the nine pages named in the issue now render with height:width 0.40 to 1.17 instead of 0.06 to 0.25. Also adds a regression test that measures the embedded PNG on three family pages.


Ported from roed-math#19, where the full write-up and comment history live.

🤖 Generated with Claude Code

roed314 and others added 2 commits July 19, 2026 01:54
…B#6828)

The aspect ratio of the family Eisenstein diagram was capped at a fixed
value of 8 in data coordinates, so families with large e and small slopes
(e.g. 2.1.16.16a, 2.1.32.34a) rendered as vertically compressed slivers
with overlapping y-axis labels.  Since the image is displayed at a fixed
width, what matters is the physical height:width ratio
aspect*maxslope/xwidth; replace the fixed cap by clamping that ratio to
[1/4, 5/4].  A survey over all 489714 stored families with w>0 shows no
diagram shrinks, ~2.5% (the compressed ones) grow by >5%, and typical
families are byte-identical.  Verified by rendering all nine pages named
in the issue plus controls via the test client and measuring the embedded
PNGs; added a regression test doing the same.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjust vertical scaling of Eisenstein diagrams for p-adic families

2 participants