{"action":"created","issue":{"url":"https://api.github.com/repos/sjPlot/devel/issues/55","labels_url":"https://api.github.com/repos/sjPlot/devel/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/sjPlot/devel/issues/55/comments","events_url":"https://api.github.com/repos/sjPlot/devel/issues/55/events","html_url":"https://github.com/sjPlot/devel/issues/55","id":97053560,"number":55,"title":"Control colors in sjp.lm(fit, type = \"ma\")","user":{"login":"jemus42","id":1613346,"avatar_url":"https://avatars.githubusercontent.com/u/1613346?v=3","gravatar_id":"","url":"https://api.github.com/users/jemus42","html_url":"https://github.com/jemus42","followers_url":"https://api.github.com/users/jemus42/followers","following_url":"https://api.github.com/users/jemus42/following{/other_user}","gists_url":"https://api.github.com/users/jemus42/gists{/gist_id}","starred_url":"https://api.github.com/users/jemus42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemus42/subscriptions","organizations_url":"https://api.github.com/users/jemus42/orgs","repos_url":"https://api.github.com/users/jemus42/repos","events_url":"https://api.github.com/users/jemus42/events{/privacy}","received_events_url":"https://api.github.com/users/jemus42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T13:30:36Z","updated_at":"2015-07-25T11:24:42Z","closed_at":"2015-07-25T11:24:42Z","body":"While this function outputs many wonderful plots, I can't seem to control the colors I need to control.  \r\nThe help file states that this `type` ignores most arguments, including `geom.colors`, which is unfortunate. However, I am currently working on a project where using red in plots is not allowed, so plots like this ![](http://dump.jemu.name/RF6w9.png) are something I need to fix.\r\n\r\nI understand that due to the large number of different plot types this function outputs, this is not an easy task, so I would be thankful for any hints on how to circumvent this, i.e. producing each plot via separate functions that offer color control, if possible?"},"comment":{"url":"https://api.github.com/repos/sjPlot/devel/issues/comments/124835828","html_url":"https://github.com/sjPlot/devel/issues/55#issuecomment-124835828","issue_url":"https://api.github.com/repos/sjPlot/devel/issues/55","id":124835828,"user":{"login":"sjPlot","id":4901179,"avatar_url":"https://avatars.githubusercontent.com/u/4901179?v=3","gravatar_id":"","url":"https://api.github.com/users/sjPlot","html_url":"https://github.com/sjPlot","followers_url":"https://api.github.com/users/sjPlot/followers","following_url":"https://api.github.com/users/sjPlot/following{/other_user}","gists_url":"https://api.github.com/users/sjPlot/gists{/gist_id}","starred_url":"https://api.github.com/users/sjPlot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjPlot/subscriptions","organizations_url":"https://api.github.com/users/sjPlot/orgs","repos_url":"https://api.github.com/users/sjPlot/repos","events_url":"https://api.github.com/users/sjPlot/events{/privacy}","received_events_url":"https://api.github.com/users/sjPlot/received_events","type":"User","site_admin":false},"created_at":"2015-07-25T11:24:42Z","updated_at":"2015-07-25T11:24:42Z","body":"I've modified the return value of this function type, so you now get a list of all plot outputs. You can then modify using the returned plot-object and add another scale:\r\n\r\n    library(ggplot2)\r\n    library(sjPlot)\r\n    library(sjmisc)\r\n    data(efc)\r\n    fit <- lm(tot_sc_e ~ c12hour + e17age + e42dep, data = efc)\r\n    dummy <- sjp.lm(fit, type = \"ma\")\r\n    dummy$plot.list[[4]] + scale_color_manual(values = c(\"blue\", \"green\"))\r\n\r\n![rplot](https://cloud.githubusercontent.com/assets/4901179/8889192/4a1f58e0-32d0-11e5-8be1-ff1cfa3e2ad8.png)\r\n\r\nHowever, if you're just interested in the forest plot: `sjp.lm(fit, type = \"ma\")` returns the updated model fit. You can then use the returned model in `sjp.lm(returned.model)` and use `geom.colors` then.\r\n\r\nI'll commit the new changes tomorrow night, I have no access to GitHub upload right now."}}