Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Correct paper sizes #22544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2022
Merged

Correct paper sizes #22544

merged 1 commit into from
Mar 3, 2022

Conversation

oscargus
Copy link
Member

PR Summary

Stumbled upon this code which doesn't seem correct (height of A8 should be same as width of A9).

'a8': (2.07, 2.91),
'a9': (1.457, 2.05),
'a10': (1.02, 1.457),

Spent some time reading up on paper sizes and cannot really say that I know what the correct answer is, but this is what I learnt:

  • The ratio between height and width is sqrt(2)
  • A0 is 1 square meter
  • Width => height for next smaller size

This gives, in mm

a0 : (840.896415253715, 1189.20711500272)
a1 : (594.603557501361, 840.896415253715)
a2 : (420.448207626857, 594.603557501361)
a3 : (297.301778750680, 420.448207626857)
a4 : (210.224103813429, 297.301778750680)
a5 : (148.650889375340, 210.224103813429)
a6 : (105.112051906714, 148.650889375340)
a7 : (74.3254446876701, 105.112051906714)
a8 : (52.5560259533572, 74.3254446876701)
a9 : (37.1627223438350, 52.5560259533572)
a10 : (26.2780129766786, 37.1627223438350)

Now, all these are rounded down, except for a0 width/a1 height, based on the tables available.

Converting to inches there are two approaches: converting the exact expression or using the expression in integer mm.

For the first, the sizes are:

a0 : (33.1061580808549, 46.8191777560126)
a1 : (23.4095888780063, 33.1061580808549)
a2 : (16.5530790404275, 23.4095888780063)
a3 : (11.7047944390032, 16.5530790404275)
a4 : (8.27653952021373, 11.7047944390032)
a5 : (5.85239721950158, 8.27653952021373)
a6 : (4.13826976010686, 5.85239721950158)
a7 : (2.92619860975079, 4.13826976010686)
a8 : (2.06913488005343, 2.92619860975079)
a9 : (1.46309930487540, 2.06913488005343)
a10 : (1.03456744002672, 1.46309930487540)

For integer mm:

a0 : (33.1102362204724, 46.8110236220472)
a1 : (23.3858267716535, 33.1102362204724)
a2 : (16.5354330708661, 23.3858267716535)
a3 : (11.6929133858268, 16.5354330708661)
a4 : (8.26771653543307, 11.6929133858268)
a5 : (5.82677165354331, 8.26771653543307)
a6 : (4.13385826771654, 5.82677165354331)
a7 : (2.91338582677165, 4.13385826771654)
a8 : (2.04724409448819, 2.91338582677165)
a9 : (1.45669291338583, 2.04724409448819)
a10 : (1.02362204724409, 1.45669291338583)

Checking all the other numbers, it seems like using the last table gives the smallest changes.

One can of course use 1.457 for a9/a10, but then one should probably use 1.024 for a10.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@oscargus oscargus changed the title Correct papersizes Correct paper sizes Feb 23, 2022
@QuLogic
Copy link
Member

QuLogic commented Feb 24, 2022

Width => height for next smaller size

And, due to the ratio, the width of the smaller size is half the height of larger.

The smallest tolerance is 0.06 in, so I think rounding to 2 decimal places might be okay, though of course on a computer things can be much more precise than physical paper.

@tacaswell tacaswell added this to the v3.6.0 milestone Mar 3, 2022
@QuLogic QuLogic merged commit f33f5ab into matplotlib:main Mar 3, 2022
@oscargus oscargus deleted the papersizes branch March 3, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants