Title: Figure.set_size_cm and Figure(figsize_cm=) as an alternative to figsize/set_size_inches · Issue #12402 · matplotlib/matplotlib · GitHub
Open Graph Title: Figure.set_size_cm and Figure(figsize_cm=) as an alternative to figsize/set_size_inches · Issue #12402 · matplotlib/matplotlib
X Title: Figure.set_size_cm and Figure(figsize_cm=) as an alternative to figsize/set_size_inches · Issue #12402 · matplotlib/matplotlib
Description: I grew tired of having to convert my units just for the sake of specifying the figure size. I'd like to specify the figure size directly in a metric unit, nominally centimeters (or millimeters, no difference). In most EU countries metric...
Open Graph Description: I grew tired of having to convert my units just for the sake of specifying the figure size. I'd like to specify the figure size directly in a metric unit, nominally centimeters (or millimeters, no ...
X Description: I grew tired of having to convert my units just for the sake of specifying the figure size. I'd like to specify the figure size directly in a metric unit, nominally centimeters (or millimeters,...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12402
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Figure.set_size_cm and Figure(figsize_cm=) as an alternative to figsize/set_size_inches","articleBody":"I grew tired of having to convert my units just for the sake of specifying the figure size. I'd like to specify the figure size directly in a metric unit, nominally centimeters (or millimeters, no difference). In most EU countries metric is the norm. I only have to deal with inches when looking at monitor sizes, printing, and matplotlib :(\r\n\r\nI've found at least two issues about this: #1369 and the more generic #9226.\r\n\r\nOf course, having support for generic unit specifiers would be nice, but I'm not entirely satisfied by the extra complexity of #9226. I'm also thorn about (size, unit) tuples, because I don't ever think I'm going to specify the figure size in AU, or picometers. Cm is regularly used for anything that fits paper.\r\n\r\nI see two cases where inches are specified in the rc:\r\n\r\n- figure.figsize\r\n- savefig.pad_inches\r\n\r\nIn the api, there is the figsize kwarg, I guess a pad_inches kwarg, and the set_size_inches method.\r\n\r\nWhat abound the KISS approach: add a figsize_cm kwarg, pad_cm, and the set_size_cm method, and the two respective rcParams? Fully backward compatible, and allows metric countries to get by easily.\r\n\r\nI could easily contribute such a patch.","author":{"url":"https://github.com/wavexx","@type":"Person","name":"wavexx"},"datePublished":"2018-10-04T15:02:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":26},"url":"https://github.com/12402/matplotlib/issues/12402"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:35da9883-9e5e-dd5a-70df-806fe5eb92a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3E2:33F819:1DE496:28AAFB:6A52E5C4 |
| html-safe-nonce | cd09bf79f31903b077dc0aaaf8601c2deac2ad17a4fd21de90e616c94994ef2c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0UyOjMzRjgxOToxREU0OTY6MjhBQUZCOjZBNTJFNUM0IiwidmlzaXRvcl9pZCI6Ijc4NzA1NTUxODgzNDM1MzA5NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9c0e241b8d7a15e476c4a4da1c459592ddeaa9d81b451fa680efe51dfdec7702 |
| hovercard-subject-tag | issue:366834135 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/12402/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ceb4af43e7b9ac07403e91600d6686a96ecc3046f9c0058d780920c5728679cc/matplotlib/matplotlib/issues/12402 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ceb4af43e7b9ac07403e91600d6686a96ecc3046f9c0058d780920c5728679cc/matplotlib/matplotlib/issues/12402 |
| og:image:alt | I grew tired of having to convert my units just for the sake of specifying the figure size. I'd like to specify the figure size directly in a metric unit, nominally centimeters (or millimeters, no ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wavexx |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width