Title: Posting scatter points over grouped bars · Issue #5480 · plotly/plotly.js · GitHub
Open Graph Title: Posting scatter points over grouped bars · Issue #5480 · plotly/plotly.js
X Title: Posting scatter points over grouped bars · Issue #5480 · plotly/plotly.js
Description: I want to have a plot with scatter points overtop of bars. The problem is that the locations (on the x axis in my case) of the bars cannot be passed to the scatter points - they always sit directly above the x-axis values rather than bei...
Open Graph Description: I want to have a plot with scatter points overtop of bars. The problem is that the locations (on the x axis in my case) of the bars cannot be passed to the scatter points - they always sit directly...
X Description: I want to have a plot with scatter points overtop of bars. The problem is that the locations (on the x axis in my case) of the bars cannot be passed to the scatter points - they always sit directly...
Opengraph URL: https://github.com/plotly/plotly.js/issues/5480
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Posting scatter points over grouped bars","articleBody":"I want to have a plot with scatter points overtop of bars. The problem is that the locations (on the x axis in my case) of the bars cannot be passed to the scatter points - they always sit directly above the x-axis values rather than being spread out across the bars within a grouped category.\r\n\r\nIts the same issue as being asked here: https://stackoverflow.com/questions/54591377/overlay-a-grouped-bar-chart-with-scatter-in-plotly\r\n\r\nI'm working in R plotly but seems this problem appears also in the Python implementation. This example should produce the error:\r\n\r\n example \u003c- data.frame(country = rep(c(\"Canada\", \"France\", \"UK\"), 2),\r\n sex = rep(c('men', 'women'), 3),\r\n value1 = 1:6 + 7,\r\n value2 = rep(14:12, 2))\r\n\r\n plot_ly(example) %>% \r\n add_trace(type = 'bar',\r\n x = ~sex, \r\n color= ~country, \r\n y= ~value1) %>%\r\n \r\n add_trace(type = 'scatter', mode=\"markers\",\r\n x = ~sex, \r\n marker = list(size = 8, color = \"#000000\"),\r\n y= ~value2) \r\n\r\nThe result is something like the screen shot below where in the 2 groups (men and women) the 3 scatter points are lined up in the middle of the group. The desired behaviour is to have those points appear above their respective colour/country groups.\r\n\r\n\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/TonyBonen","@type":"Person","name":"TonyBonen"},"datePublished":"2021-02-08T23:00:56Z","url":"https://github.com/plotly/plotly.js/issues/5480"}
| 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:5f712e57-9e64-45c9-7700-889b0d29cfb6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C114:16AB79:2C9BFC8:38BDF7D:6B01B6B6 |
| html-safe-nonce | f54fdf2339cc15d2c7b5501151e042e40bc8a27e7d64db26cab8ac640bbfe0c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTE0OjE2QUI3OToyQzlCRkM4OjM4QkRGN0Q6NkIwMUI2QjYiLCJ2aXNpdG9yX2lkIjoiNDc0MTY2ODI0MDQ1MzkwODE1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 48486b40d13b0a1464541f4c31d37c1dc3ede31ba911951c5f99fdf8697bee6a |
| hovercard-subject-tag | issue:804039516 |
| 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.js/5480/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3bbcc211bbb0e2d2b8fd9b82b83e581eb6f2f0754eb16fd17a841bb8a7296304/plotly/plotly.js/issues/5480 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3bbcc211bbb0e2d2b8fd9b82b83e581eb6f2f0754eb16fd17a841bb8a7296304/plotly/plotly.js/issues/5480 |
| og:image:alt | I want to have a plot with scatter points overtop of bars. The problem is that the locations (on the x axis in my case) of the bars cannot be passed to the scatter points - they always sit directly... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TonyBonen |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width