{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/9bd5dd5b3d0a461d37f01fa425d5df4b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"9bd5dd5b3d0a461d37f01fa425d5df4b","url":"https://api.github.com/users/JoeMottram","login":"JoeMottram","id":594358},"milestone":null,"labels":[],"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/1f81352a3d879661f37a82f01f89b4f3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1f81352a3d879661f37a82f01f89b4f3","url":"https://api.github.com/users/leejjoon","login":"leejjoon","id":95962},"updated_at":"2011-11-13T11:47:00Z","comments":4,"closed_at":"2011-11-13T11:47:00Z","url":"https://api.github.com/repos/leejjoon/pywcsgrid2/issues/6","body":"Hi,\r\n  I am currently running a Mac with 0SX 10.7 Lion, python 2.7.2 and the latest stable versions of numpy, scipy, matplotlib, pyfits, pywcs and pywcsgrid2. When I try:\r\n\r\nap=pywcsgrid2.subplot(111,header=pywcs.WCS(h2[0].header))\r\n\r\nI get the following error message, regardless of the fits file I use:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pywcsgrid2/__init__.py\", line 47, in subplot\r\n    ax = plt.subplot(ax)\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py\", line 766, in subplot\r\n    a = fig.add_subplot(*args, **kwargs)\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py\", line 747, in add_subplot\r\n    key = self._make_key(*args, **kwargs)\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py\", line 630, in _make_key\r\n    key = fixlist(args), fixitems(kwargs.items())\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py\", line 626, in fixlist\r\n    if iterable(a): a = tuple(a)\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pywcsgrid2/axes_wcs.py\", line 1270, in __getitem__\r\n    key = proj.sub([1,2])\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pywcsgrid2/wcs_helper.py\", line 240, in sub\r\n    return self.substitute(axis_nums_to_keep, [0] * self.naxis)\r\n  File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pywcsgrid2/wcs_helper.py\", line 264, in _get_naxis\r\n    return self._pywcs.wcs.naxis\r\nAttributeError: 'int' object has no attribute 'wcs'\r\n\r\nAny ideas why this is happening and how to fix it?\r\n","html_url":"https://github.com/leejjoon/pywcsgrid2/issues/6","title":"pywcsgrid2.subplot error message","number":6,"id":2218097,"created_at":"2011-11-12T18:20:55Z"},"action":"closed"}