{"action":"created","issue":{"url":"https://api.github.com/repos/mwaskom/seaborn/issues/560","labels_url":"https://api.github.com/repos/mwaskom/seaborn/issues/560/labels{/name}","comments_url":"https://api.github.com/repos/mwaskom/seaborn/issues/560/comments","events_url":"https://api.github.com/repos/mwaskom/seaborn/issues/560/events","html_url":"https://github.com/mwaskom/seaborn/issues/560","id":76166733,"number":560,"title":"despine with trim=True fails on horizontal categorical plots","user":{"login":"mwaskom","id":315810,"avatar_url":"https://avatars.githubusercontent.com/u/315810?v=3","gravatar_id":"","url":"https://api.github.com/users/mwaskom","html_url":"https://github.com/mwaskom","followers_url":"https://api.github.com/users/mwaskom/followers","following_url":"https://api.github.com/users/mwaskom/following{/other_user}","gists_url":"https://api.github.com/users/mwaskom/gists{/gist_id}","starred_url":"https://api.github.com/users/mwaskom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwaskom/subscriptions","organizations_url":"https://api.github.com/users/mwaskom/orgs","repos_url":"https://api.github.com/users/mwaskom/repos","events_url":"https://api.github.com/users/mwaskom/events{/privacy}","received_events_url":"https://api.github.com/users/mwaskom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mwaskom/seaborn/labels/bug","name":"bug","color":"B22222"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-13T23:53:49Z","updated_at":"2015-05-14T01:53:44Z","closed_at":null,"body":"```python\r\nplanets = sns.load_dataset(\"planets\")\r\nax = sns.boxplot(x=\"orbital_period\", y=\"method\",\r\n                 data=planets[planets.orbital_period < 1000])\r\nsns.despine(trim=True)\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nIndexError                                Traceback (most recent call last)\r\n<ipython-input-103-cd9b605db889> in <module>()\r\n      2 ax = sns.boxplot(x=\"orbital_period\", y=\"method\",\r\n      3                  data=planets[planets.orbital_period < 1000])\r\n----> 4 sns.despine(trim=True)\r\n\r\n/Users/mwaskom/Code/seaborn/seaborn/utils.pyc in despine(fig, ax, top, right, left, bottom, offset, trim)\r\n    218 \r\n    219             yticks = ax_i.get_yticks()\r\n--> 220             firsttick = np.compress(yticks >= ax_i.get_ylim()[0], yticks)[0]\r\n    221             lasttick = np.compress(yticks <= ax_i.get_ylim()[-1], yticks)[-1]\r\n    222             ax_i.spines['left'].set_bounds(firsttick, lasttick)\r\n\r\nIndexError: index 0 is out of bounds for axis 0 with size 0\r\n```\r\n\r\n@phobson I think you originally wrote this code; any idea what's up here?"},"comment":{"url":"https://api.github.com/repos/mwaskom/seaborn/issues/comments/101878484","html_url":"https://github.com/mwaskom/seaborn/issues/560#issuecomment-101878484","issue_url":"https://api.github.com/repos/mwaskom/seaborn/issues/560","id":101878484,"user":{"login":"phobson","id":1163939,"avatar_url":"https://avatars.githubusercontent.com/u/1163939?v=3","gravatar_id":"","url":"https://api.github.com/users/phobson","html_url":"https://github.com/phobson","followers_url":"https://api.github.com/users/phobson/followers","following_url":"https://api.github.com/users/phobson/following{/other_user}","gists_url":"https://api.github.com/users/phobson/gists{/gist_id}","starred_url":"https://api.github.com/users/phobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobson/subscriptions","organizations_url":"https://api.github.com/users/phobson/orgs","repos_url":"https://api.github.com/users/phobson/repos","events_url":"https://api.github.com/users/phobson/events{/privacy}","received_events_url":"https://api.github.com/users/phobson/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T01:53:44Z","updated_at":"2015-05-14T01:53:44Z","body":"Weird, I copypasta'd your example -- and just tried it again -- and I'm getting the same error.\r\n\r\nI'll debug further on a clean env when I get home.\r\n"}}