{"action":"created","issue":{"url":"https://api.github.com/repos/gge-ucd/Discussion/issues/43","repository_url":"https://api.github.com/repos/gge-ucd/Discussion","labels_url":"https://api.github.com/repos/gge-ucd/Discussion/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/gge-ucd/Discussion/issues/43/comments","events_url":"https://api.github.com/repos/gge-ucd/Discussion/issues/43/events","html_url":"https://github.com/gge-ucd/Discussion/issues/43","id":300442663,"number":43,"title":"using geom_line and color = sex doesn't actually color the lines by sex","user":{"login":"mkclapp","id":35150535,"avatar_url":"https://avatars2.githubusercontent.com/u/35150535?v=4","gravatar_id":"","url":"https://api.github.com/users/mkclapp","html_url":"https://github.com/mkclapp","followers_url":"https://api.github.com/users/mkclapp/followers","following_url":"https://api.github.com/users/mkclapp/following{/other_user}","gists_url":"https://api.github.com/users/mkclapp/gists{/gist_id}","starred_url":"https://api.github.com/users/mkclapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkclapp/subscriptions","organizations_url":"https://api.github.com/users/mkclapp/orgs","repos_url":"https://api.github.com/users/mkclapp/repos","events_url":"https://api.github.com/users/mkclapp/events{/privacy}","received_events_url":"https://api.github.com/users/mkclapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T23:58:35Z","updated_at":"2018-02-27T01:37:55Z","closed_at":null,"author_association":"NONE","body":"Has anyone else noticed that when they're making the plot for the w7 assignment, the resulting plot doesn't actually assign different colors by sex?\r\n\r\n`ggplot(data = yearly_sex_counts,  \r\n       aes(x = year, y = n, color = sex)) +   \r\n  geom_line() +  \r\n  facet_wrap(~species_id)`  \r\n\r\nresults in the plot that we're targeting, but all the bars are pink, making it seem like there are only females in the dataset.\r\n![image](https://user-images.githubusercontent.com/35150535/36702786-66b0afe0-1b0d-11e8-8346-de576609c68b.png)\r\n\r\n\r\nwhereas using geom_point actually colors the measurements by sex:\r\n\r\n`  ggplot(data = yearly_sex_counts,  \r\n       aes(x = year, y = n, color = sex)) +  \r\n  geom_point(alpha = 0.5) +  \r\n  facet_wrap(~species_id) +  \r\n  theme_bw()`  \r\n![image](https://user-images.githubusercontent.com/35150535/36702780-580d3ac6-1b0d-11e8-8f30-3ec160d0de71.png)\r\n\r\ni tried moving the `color = sex` into an aes() inside geom_line() instead of the main ggplot(), but that didn't work. and i tried messing with the transparency just in case all the blue values were hiding behind the pink ones, but that was not the case.\r\n\r\npor que? @ryanpeek @mikoontz @MarthaWohlfeil @MCMaurer ?"},"comment":{"url":"https://api.github.com/repos/gge-ucd/Discussion/issues/comments/368715680","html_url":"https://github.com/gge-ucd/Discussion/issues/43#issuecomment-368715680","issue_url":"https://api.github.com/repos/gge-ucd/Discussion/issues/43","id":368715680,"user":{"login":"mikoontz","id":11068126,"avatar_url":"https://avatars3.githubusercontent.com/u/11068126?v=4","gravatar_id":"","url":"https://api.github.com/users/mikoontz","html_url":"https://github.com/mikoontz","followers_url":"https://api.github.com/users/mikoontz/followers","following_url":"https://api.github.com/users/mikoontz/following{/other_user}","gists_url":"https://api.github.com/users/mikoontz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikoontz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikoontz/subscriptions","organizations_url":"https://api.github.com/users/mikoontz/orgs","repos_url":"https://api.github.com/users/mikoontz/repos","events_url":"https://api.github.com/users/mikoontz/events{/privacy}","received_events_url":"https://api.github.com/users/mikoontz/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T01:37:55Z","updated_at":"2018-02-27T01:37:55Z","author_association":"CONTRIBUTOR","body":"Hmm, good question. The plot on the website even seems a bit off (more like the one you have on the top than one that properly colors two separate lines): https://gge-ucd.github.io/R-DAVIS/lesson_import_dplyr_ggplot2.html#visualize_the_data\r\n\r\nWhen you run `packageVersion(\"ggplot2\")`, what do you get?\r\n\r\nI get \r\n\r\n```\r\n> packageVersion(\"ggplot2\")\r\n[1] ‘2.2.1.9000’\r\n```"}}
{"actor":{"display_login":"mikoontz"}}