{"action":"created","issue":{"url":"https://api.github.com/repos/ropensci/plotly/issues/1301","repository_url":"https://api.github.com/repos/ropensci/plotly","labels_url":"https://api.github.com/repos/ropensci/plotly/issues/1301/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/plotly/issues/1301/comments","events_url":"https://api.github.com/repos/ropensci/plotly/issues/1301/events","html_url":"https://github.com/ropensci/plotly/issues/1301","id":338972427,"node_id":"MDU6SXNzdWUzMzg5NzI0Mjc=","number":1301,"title":"layout breaks with facet_wrap when employing scales=free","user":{"login":"geotheory","id":1282581,"node_id":"MDQ6VXNlcjEyODI1ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282581?v=4","gravatar_id":"","url":"https://api.github.com/users/geotheory","html_url":"https://github.com/geotheory","followers_url":"https://api.github.com/users/geotheory/followers","following_url":"https://api.github.com/users/geotheory/following{/other_user}","gists_url":"https://api.github.com/users/geotheory/gists{/gist_id}","starred_url":"https://api.github.com/users/geotheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotheory/subscriptions","organizations_url":"https://api.github.com/users/geotheory/orgs","repos_url":"https://api.github.com/users/geotheory/repos","events_url":"https://api.github.com/users/geotheory/events{/privacy}","received_events_url":"https://api.github.com/users/geotheory/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-06T15:03:14Z","updated_at":"2018-07-06T15:03:39Z","closed_at":null,"author_association":"NONE","body":"I have a problem combining `plotly::ggplotly` (v4.7.1) with `facet_wrap` (v3.0.0) that I can't seem to generalise but is reproducible with a particular dataset (summary metrics for a set of tweets):\r\n\r\n    require(tidyverse)\r\n    require(plotly)\r\n    d = read_csv('https://gist.githubusercontent.com/geotheory/21c4eacbf38ed397f7cf984f8d92e931/raw/9148df79326f53a66a8cc363241a440752487357/data.csv')\r\n    d = d %>% mutate(key = fct_reorder(key, n)) # order the bars\r\n    p = ggplot(d, aes(key, n)) + geom_bar(stat='identity') + \r\n      facet_wrap(~ set, scales='free', nrow=1) +\r\n      labs(x=NULL, y=NULL) + coord_flip()\r\n    print(p)\r\n\r\n[![enter image description here][1]][1]\r\n\r\nEnter ggplotly:\r\n\r\n    print(ggplotly(p))\r\n\r\n[![enter image description here][2]][2]\r\n\r\nThis seems to relate to the combination of `nrow=1` and `scales='free'` arguments. Any ideas about the cause?\r\n\r\n  [1]: https://i.stack.imgur.com/lwHJK.png\r\n  [2]: https://i.stack.imgur.com/AYvax.png"},"comment":{"url":"https://api.github.com/repos/ropensci/plotly/issues/comments/403060599","html_url":"https://github.com/ropensci/plotly/issues/1301#issuecomment-403060599","issue_url":"https://api.github.com/repos/ropensci/plotly/issues/1301","id":403060599,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzA2MDU5OQ==","user":{"login":"geotheory","id":1282581,"node_id":"MDQ6VXNlcjEyODI1ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282581?v=4","gravatar_id":"","url":"https://api.github.com/users/geotheory","html_url":"https://github.com/geotheory","followers_url":"https://api.github.com/users/geotheory/followers","following_url":"https://api.github.com/users/geotheory/following{/other_user}","gists_url":"https://api.github.com/users/geotheory/gists{/gist_id}","starred_url":"https://api.github.com/users/geotheory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geotheory/subscriptions","organizations_url":"https://api.github.com/users/geotheory/orgs","repos_url":"https://api.github.com/users/geotheory/repos","events_url":"https://api.github.com/users/geotheory/events{/privacy}","received_events_url":"https://api.github.com/users/geotheory/received_events","type":"User","site_admin":false},"created_at":"2018-07-06T15:03:39Z","updated_at":"2018-07-06T15:03:39Z","author_association":"NONE","body":"Also submitted to [stackoverflow](https://stackoverflow.com/questions/51212623/plotlyggplotly-is-breaking-for-certain-facet-wrap-data)."}}
{"actor":{"display_login":"geotheory"}}