Title: legend positioning · Issue #195 · plotly/plotly.R · GitHub
Open Graph Title: legend positioning · Issue #195 · plotly/plotly.R
X Title: legend positioning · Issue #195 · plotly/plotly.R
Description: a lot of legends are coming out with weird positioning (#194 (comment)) a couple things to work out: move the horizontal position of the legend to the right more layout$legend$x <- 1.0 # move it to the right a bit layout$legend$xanchor <...
Open Graph Description: a lot of legends are coming out with weird positioning (#194 (comment)) a couple things to work out: move the horizontal position of the legend to the right more layout$legend$x <- 1.0 # move it to...
X Description: a lot of legends are coming out with weird positioning (#194 (comment)) a couple things to work out: move the horizontal position of the legend to the right more layout$legend$x <- 1.0 # move it...
Opengraph URL: https://github.com/plotly/plotly.R/issues/195
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"legend positioning","articleBody":"a lot of legends are coming out with weird positioning (https://github.com/ropensci/plotly/issues/194#issuecomment-87780687)\n\n\n a couple things to work out:\n- [x] move the horizontal position of the legend to the right more\n \n ```\n layout$legend$x \u003c- 1.0 # move it to the right a bit\n layout$legend$xanchor \u003c- \"left\" \n layout$annotation[[1]]$x \u003c- 1.01\n layout$annotation[[1]]$xanchor \u003c- \"left\"\n ```\n- [x] the vertical position of the legend should stay in the middle, with `yanchor \u003c- \"middle\"`\n \n ```\n layout$legend$y \u003c- 0.5 # page middle\n layout$legend$yanchor \u003c- \"middle\" \n ```\n \n but we should compute the vertical position of the legend title annotation to remain above the legend, no matter how many entries. For now, we could hardcode a mapping in that would work for default font-sizes:\n - 8 legend entries: `annotation$y \u003c- 0.65` (from manual inspection)\n - 1 legend entry: `annotation$y \u003c- 0.52` (manual inspection)\n - -\u003e `annotation$y \u003c- 0.14125 * number_of_legend_items - 0.48` (computed from those two points above)\n \n @alexcjohnson, how do you think legend titles will work in the future? a separate attribute inside `legend`?\n- [ ] manual legend positions from ggplot: https://github.com/ropensci/plotly/blob/add-r-cookbook-tests/tests/cookbook-test-suite/legends.R#L109-L122\n\ncc @tdhock , @cpsievert \n","author":{"url":"https://github.com/chriddyp","@type":"Person","name":"chriddyp"},"datePublished":"2015-03-30T19:53:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/195/plotly.R/issues/195"}
| 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:8ec74ebf-2be0-c338-b32e-a77b056c07ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9EFC:355854:55AEAE3:76548DE:6A5E9DF2 |
| html-safe-nonce | 6fca344cbcc8c71441b8b20fc8bcb38a11b6d1ef594340315794dfbe13a6e677 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUZDOjM1NTg1NDo1NUFFQUUzOjc2NTQ4REU6NkE1RTlERjIiLCJ2aXNpdG9yX2lkIjoiNjIwODUwMDc0ODU3MTgxMTMxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 08857597ec9a49c6b663113f34e3ffea8966c395bd0db5f1604b6c08f75fa92f |
| hovercard-subject-tag | issue:65288229 |
| 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/195/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f79baf89522d2756edaf5bffb25fb7489275da2c0e4d63158deb7d50e18d341/plotly/plotly.R/issues/195 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f79baf89522d2756edaf5bffb25fb7489275da2c0e4d63158deb7d50e18d341/plotly/plotly.R/issues/195 |
| og:image:alt | a lot of legends are coming out with weird positioning (#194 (comment)) a couple things to work out: move the horizontal position of the legend to the right more layout$legend$x <- 1.0 # move it to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chriddyp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d |
| 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 | 2d2ac9bdd71d5f53f2b731c9330677e38624e301 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width