{"action":"created","issue":{"url":"https://api.github.com/repos/obspy/obspy/issues/1181","labels_url":"https://api.github.com/repos/obspy/obspy/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/1181/comments","events_url":"https://api.github.com/repos/obspy/obspy/issues/1181/events","html_url":"https://github.com/obspy/obspy/issues/1181","id":117427772,"number":1181,"title":"bug in beachball plotting routine?","user":{"login":"MatthiasMeschede","id":2597803,"avatar_url":"https://avatars.githubusercontent.com/u/2597803?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthiasMeschede","html_url":"https://github.com/MatthiasMeschede","followers_url":"https://api.github.com/users/MatthiasMeschede/followers","following_url":"https://api.github.com/users/MatthiasMeschede/following{/other_user}","gists_url":"https://api.github.com/users/MatthiasMeschede/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthiasMeschede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthiasMeschede/subscriptions","organizations_url":"https://api.github.com/users/MatthiasMeschede/orgs","repos_url":"https://api.github.com/users/MatthiasMeschede/repos","events_url":"https://api.github.com/users/MatthiasMeschede/events{/privacy}","received_events_url":"https://api.github.com/users/MatthiasMeschede/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-17T19:15:20Z","updated_at":"2015-11-18T18:19:56Z","closed_at":null,"body":"Hi obspy team,\r\n\r\nthe following three moment tensors throw an error in my obspy 0.10.2 when using the imaging.beachball routine. The mopad function works fine.\r\n\r\n    #!/usr/bin/env python\r\n    \r\n    from obspy.imaging.beachball import Beach\r\n    #from obspy.imaging.mopad_wrapper import Beach\r\n    import matplotlib.pyplot as plt\r\n\r\n    mt = [0.000, -1.232e25, 1.233e25, 0.141e25, -0.421e25, 2.531e25] #CMTEVENT C010398B\r\n    #mt = [0.0, -12.32, 12.33, 1.41, -4.21, 25.31]\r\n    #mt = [0., -1., 1., 1., -1., 1.]\r\n    beach = Beach(mt, xy=(50, 50), width=50)\r\n\r\n    ax = plt.gca()\r\n    ax.add_collection(beach)\r\n    ax.set_aspect(\"equal\")\r\n    ax.set_xlim((-120, 120))\r\n    ax.set_ylim((-20, 120))\r\n\r\n    plt.show()\r\n\r\nError msg:\r\n\r\n    Traceback (most recent call last):\r\n      File \"./obspy_bug.py\", line 10, in <module>\r\n        beach = Beach(mt, xy=(50, 50), width=50)\r\n      File \"/usr/local/lib/python2.7/dist-packages/obspy/imaging/beachball.py\", line 122, in Beach\r\n        plot_zerotrace=True, xy=xy, width=width)\r\n      File \"/usr/local/lib/python2.7/dist-packages/obspy/imaging/beachball.py\", line 401, in plotMT\r\n        azi[n][0] = az\r\n    IndexError: index 3 is out of bounds for axis 0 with size 3\r\n\r\nJust wanted to report in case you didn't see this already,\r\n\r\nMatthias"},"comment":{"url":"https://api.github.com/repos/obspy/obspy/issues/comments/157808754","html_url":"https://github.com/obspy/obspy/issues/1181#issuecomment-157808754","issue_url":"https://api.github.com/repos/obspy/obspy/issues/1181","id":157808754,"user":{"login":"krischer","id":800487,"avatar_url":"https://avatars.githubusercontent.com/u/800487?v=3","gravatar_id":"","url":"https://api.github.com/users/krischer","html_url":"https://github.com/krischer","followers_url":"https://api.github.com/users/krischer/followers","following_url":"https://api.github.com/users/krischer/following{/other_user}","gists_url":"https://api.github.com/users/krischer/gists{/gist_id}","starred_url":"https://api.github.com/users/krischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krischer/subscriptions","organizations_url":"https://api.github.com/users/krischer/orgs","repos_url":"https://api.github.com/users/krischer/repos","events_url":"https://api.github.com/users/krischer/events{/privacy}","received_events_url":"https://api.github.com/users/krischer/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T18:19:56Z","updated_at":"2015-11-18T18:19:56Z","body":"Thanks for reporting. I've also noticed that ocassionally...but as you said: using mopad for the plotting works just fine.\r\n\r\nCould we just replace the beachball plotting routine with a wrapper around mopad?"}}