Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Write custom docstring to avoid sphinx errors
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Jun 2, 2015
1 parent bd44e6e commit fe16fc3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions wcsaxes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from matplotlib.transforms import Affine2D, Bbox, Transform

from astropy.wcs import WCS
from astropy.utils import InheritDocstrings
from astropy.extern import six

from .transforms import (WCSPixel2WorldTransform, WCSWorld2PixelTransform,
Expand All @@ -26,7 +25,6 @@
IDENTITY.wcs.cdelt = [1., 1.]


@six.add_metaclass(InheritDocstrings)
class WCSAxes(Axes):

def __init__(self, fig, rect, wcs=None, transform=None, coord_meta=None,
Expand Down Expand Up @@ -91,6 +89,17 @@ def _hide_parent_artists(self):
# set to ``lower`` for all images, which means that we need to flip RGB
# images.
def imshow(self, X, *args, **kwargs):
"""
Wrapper to Matplotlib's :meth:`~matplotlib.axes.Axes.imshow`.
If an RGB image is passed as a PIL object, it will be flipped
vertically and ``origin`` will be set to ``lower``, since WCS
transformations - like FITS files - assume that the origin is the lower
left pixel of the image (whereas RGB images have the origin in the top
left).
All arguments are passed to :meth:`~matplotlib.axes.Axes.imshow`.
"""

origin = kwargs.get('origin', None)

Expand Down

0 comments on commit fe16fc3

Please sign in to comment.