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:6990d894-9386-bda1-34cd-e64f6943c400 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 990E:355826:9418F88:C846F55:6A5E8365 |
| html-safe-nonce | b539f869fef401a0da71ce54a4d1caef007efbd4ddc12add2b5961312f1e5e18 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTBFOjM1NTgyNjo5NDE4Rjg4OkM4NDZGNTU6NkE1RTgzNjUiLCJ2aXNpdG9yX2lkIjoiNzMxMjc2OTI1MDE5NjYyMDEzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6232e2a60fc75a252ad0859a970bfb6de9a69de81a26ea9339eb92e7e28dc4e |
| 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 | e0c30ec4bc4cc128be7eee7ef869507723a2ac9916267b7e0d370b3580a5e7ba |
| 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 | 68ef39d284f7f48d37e751bc9bc0a9a4166228d5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width