Title: Extra (unwanted) geoms in the legend · Issue #572 · plotly/plotly.R · GitHub
Open Graph Title: Extra (unwanted) geoms in the legend · Issue #572 · plotly/plotly.R
X Title: Extra (unwanted) geoms in the legend · Issue #572 · plotly/plotly.R
Description: The code: library(plotly) dat1 <- data.frame( sex = factor(c("Female","Female","Male","Male")), time = factor(c("Lunch","Dinner","Lunch","Dinner"), levels=c("Lunch","Dinner")), total_bill = c(13.53, 16.81, 16.24, 17.42) ) ggplot(data=dat...
Open Graph Description: The code: library(plotly) dat1 <- data.frame( sex = factor(c("Female","Female","Male","Male")), time = factor(c("Lunch","Dinner","Lunch","Dinner"), levels=c("Lunch","Dinner")), total_bill = c(13.53...
X Description: The code: library(plotly) dat1 <- data.frame( sex = factor(c("Female","Female","Male","Male")), time = factor(c("Lunch","Dinner","...
Opengraph URL: https://github.com/plotly/plotly.R/issues/572
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extra (unwanted) geoms in the legend","articleBody":"##### The code:\n\n``` r\nlibrary(plotly)\n\ndat1 \u003c- data.frame(\n sex = factor(c(\"Female\",\"Female\",\"Male\",\"Male\")),\n time = factor(c(\"Lunch\",\"Dinner\",\"Lunch\",\"Dinner\"), levels=c(\"Lunch\",\"Dinner\")),\n total_bill = c(13.53, 16.81, 16.24, 17.42)\n)\n\nggplot(data=dat1, aes(x=time, y=total_bill, group=sex, shape=sex, colour=sex)) +\n geom_line(aes(linetype=sex), size=1) + # Set linetype by sex\n geom_point(size=5) + # Use larger points, fill with white\n scale_colour_hue(name=\"Sex\", # Set legend title\n l=30) + # Use darker colors (lightness=30)\n scale_shape_manual(name=\"Sex\",\n values=c(22,21)) + # Use points with a fill color\n scale_linetype_discrete(name=\"Sex\") +\n xlab(\"Time of day\") + ylab(\"Total bill\") + # Set axis labels\n ggtitle(\"Average bill for 2 people\") + # Set title\n theme_bw()\n\nggplotly()\n```\n##### The ggplot version:\n\n\n##### The ggplotly version:\n\n\n##### Session Info:\n\n> sessionInfo()\n> R version 3.2.3 (2015-12-10)\n> Platform: x86_64-apple-darwin13.4.0 (64-bit)\n> Running under: OS X 10.9.4 (Mavericks)\n> \n> locale:\n> [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8\n> \n> attached base packages:\n> [1] stats graphics grDevices utils datasets methods base \n> \n> other attached packages:\n> [1] plotly_3.4.13 ggplot2_2.1.0\n> \n> loaded via a namespace (and not attached):\n> [1] Rcpp_0.12.4 tidyr_0.4.1 assertthat_0.1 dplyr_0.4.3 \n> [5] digest_0.6.9 grid_3.2.3 plyr_1.8.3 R6_2.1.2 \n> [9] DBI_0.3.1 jsonlite_0.9.19 gtable_0.2.0 magrittr_1.5 \n> [13] scales_0.4.0 httr_1.1.0 viridis_0.3.4 labeling_0.3 \n> [17] tools_3.2.3 htmlwidgets_0.6 munsell_0.4.3 yaml_2.1.13 \n> [21] parallel_3.2.3 base64enc_0.1-3 colorspace_1.2-6 htmltools_0.3.5 \n> [25] gridExtra_2.2.1\n","author":{"url":"https://github.com/yankev","@type":"Person","name":"yankev"},"datePublished":"2016-05-04T21:49:58Z","url":"https://github.com/plotly/plotly.R/issues/572"}
| 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:ced5d1c0-1168-7df3-93f1-8f16d6cdec4f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABCA:240CD1:106BE8F:14F01BE:6B011516 |
| html-safe-nonce | 16525a3f65ed46dbcd94aaa6b4ff7fb51a315ebffa7556086967c7556efd6bc2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkNBOjI0MENEMToxMDZCRThGOjE0RjAxQkU6NkIwMTE1MTYiLCJ2aXNpdG9yX2lkIjoiMzU0MTg1NTEwNzU0MzAxMjYzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a2c38a273579c691750bd4439c2f0b1f2184532a59aaa47ce95ed2d40edbee85 |
| hovercard-subject-tag | issue:153123167 |
| 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/572/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d9c8fd99c2b717b16d4349f58f0586fb652da3941e0fc4d5bae40e1d3d64c540/plotly/plotly.R/issues/572 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d9c8fd99c2b717b16d4349f58f0586fb652da3941e0fc4d5bae40e1d3d64c540/plotly/plotly.R/issues/572 |
| og:image:alt | The code: library(plotly) dat1 <- data.frame( sex = factor(c("Female","Female","Male","Male")), time = factor(c("Lunch","Dinner","Lunch","Dinner"), levels=c("Lunch","Dinner")), total_bill = c(13.53... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yankev |
| 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