Title: problem in get_domains(nPanels, nRows, margins) in ggplotly.R · Issue #1628 · plotly/plotly.R · GitHub
Open Graph Title: problem in get_domains(nPanels, nRows, margins) in ggplotly.R · Issue #1628 · plotly/plotly.R
X Title: problem in get_domains(nPanels, nRows, margins) in ggplotly.R · Issue #1628 · plotly/plotly.R
Description: I encountered a strange error recently: plot2 <- plot + facet_wrap( ~ group, ncol=2) p <- ggplotly(plot2,tooltip = c("x","y","label")) Error in get_domains(nPanels, nRows, margins) : The sum of the widths and heights arguments must be le...
Open Graph Description: I encountered a strange error recently: plot2 <- plot + facet_wrap( ~ group, ncol=2) p <- ggplotly(plot2,tooltip = c("x","y","label")) Error in get_domains(nPanels, nRows, margins) : The sum of the...
X Description: I encountered a strange error recently: plot2 <- plot + facet_wrap( ~ group, ncol=2) p <- ggplotly(plot2,tooltip = c("x","y","label")) Error in get_domains(nPane...
Opengraph URL: https://github.com/plotly/plotly.R/issues/1628
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"problem in get_domains(nPanels, nRows, margins) in ggplotly.R","articleBody":"I encountered a strange error recently:\r\n```\r\nplot2 \u003c- plot + facet_wrap( ~ group, ncol=2)\r\np \u003c- ggplotly(plot2,tooltip = c(\"x\",\"y\",\"label\"))\r\nError in get_domains(nPanels, nRows, margins) : The sum of the widths and heights arguments must be less than 1\r\n```\r\nMy ncol = 2 in a facet wrap ggplot, and ncol = 11. \r\n\r\n```\r\nget_domains \u003c- function(nplots = nPanels, nrows = nRows, margins = margins, \r\n widths = NULL, heights = NULL) {\r\n if (length(margins) == 1) margins \u003c- rep(margins, 4)\r\n if (length(margins) != 4) stop(\"margins must be length 1 or 4\", call. = FALSE)\r\n ncols \u003c- ceiling(nplots / nrows)\r\n widths \u003c- widths %||% rep(1 / ncols, ncols)\r\n heights \u003c- heights %||% rep(1 / nrows, nrows)\r\n if (length(widths) != ncols) {\r\n stop(\"The length of the widths argument must be equal \",\r\n \"to the number of columns\", call. = FALSE)\r\n }\r\n if (length(heights) != nrows) {\r\n stop(\"The length of the heights argument is \", length(heights),\r\n \", but the number of rows is \", nrows, call. = FALSE)\r\n }\r\n if (any(widths \u003c 0) | any(heights \u003c 0)) {\r\n stop(\"The widths and heights arguments must contain positive values\")\r\n }\r\n if (sum(widths) > 1 | sum(heights) > 1) {\r\n stop(\"The sum of the widths and heights arguments must be less than 1\")\r\n }\r\n ...\r\n }\r\n```\r\nThe auto-sizing calculated height as in the get_domains function, but there is some issue with sum(heights) for certain numbers:\r\n```\r\n> heights \u003c- heights %||% rep(1 / nrows, nrows)\r\n\r\n> heights\r\n [1] 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909 0.09090909\r\n\r\n> sum(heights) > 1\r\n[1] TRUE\r\n> sum(heights)\r\n[1] 1\r\n```","author":{"url":"https://github.com/hjia222","@type":"Person","name":"hjia222"},"datePublished":"2019-09-26T15:37:24Z","url":"https://github.com/plotly/plotly.R/issues/1628"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:778990ba-6733-b0ee-faf7-ee1eab3b12cd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E374:96DDF:D509F2:10ED390:6B010070 |
| html-safe-nonce | 836af6b5460f3bd1960e180cce80db9315191ccc98a090a9816548933bcb13a9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzc0Ojk2RERGOkQ1MDlGMjoxMEVEMzkwOjZCMDEwMDcwIiwidmlzaXRvcl9pZCI6IjIxODg4MzMzMzE0NzMzNTA3NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 32bd7b58ab15c088022f66f887a9ec3c77236d3255e543ddc3a4d8e2c334491a |
| hovercard-subject-tag | issue:498965100 |
| 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/plotly/plotly.R/1628/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9971fe2997f486a3200f1dcf080b00daa1b241b9b24e30f1cc55364668aa2ca9/plotly/plotly.R/issues/1628 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9971fe2997f486a3200f1dcf080b00daa1b241b9b24e30f1cc55364668aa2ca9/plotly/plotly.R/issues/1628 |
| og:image:alt | I encountered a strange error recently: plot2 <- plot + facet_wrap( ~ group, ncol=2) p <- ggplotly(plot2,tooltip = c("x","y","label")) Error in get_domains(nPanels, nRows, margins) : The sum of the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hjia222 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.R git https://github.com/plotly/plotly.R.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579179 |
| octolytics-dimension-repository_nwo | plotly/plotly.R |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579179 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.R |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width