Skip to content

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

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

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

Conversation

@roed-math

Copy link
Copy Markdown
Owner

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, ~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–1.17 instead
of 0.06–0.25. Also adds a regression test that measures the embedded PNG on three family pages.
Addresses LMFDB#6828.

🤖 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>
@roed314

roed314 commented Aug 5, 2026

Copy link
Copy Markdown

GPT signed off.

@roed-math

Copy link
Copy Markdown
Owner Author

Superseded by LMFDB#7155, opened upstream from this same branch. Closing here; review continues upstream.

@roed-math roed-math closed this Aug 6, 2026
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.

2 participants