'Plot `~astropy.coordinates.SkyCoord` or
`~astropy.coordinates.BaseCoordinateFrame` objects onto the axes.
The first argument to
:meth:`~astropy.visualization.wcsaxes.WCSAxes.plot_coord` should be a
coordinate, which will then be converted to the first two parameters to
`matplotlib.axes.Axes.plot`. All other arguments are the same as
`matplotlib.axes.Axes.plot`. If not specified a ``transform`` keyword
argument will be created based on the coordinate.
Parameters
coordinate : `~astropy.coordinates.SkyCoord` or `~astropy.coordinates.BaseCoordinateFrame`
The coordinate object to plot on the axes. This is converted to the
first two arguments to `matplotlib.axes.Axes.plot`.
See Also
matplotlib.axes.Axes.plot : This method is called from this function with all arguments passed to it.'

def plot_coord(self, *args, **kwargs):

    if isinstance(args[0], (SkyCoord, BaseCoordinateFrame)):
        frame0 = args[0]
        if isinstance(frame0, SkyCoord):
            frame0 = frame0.frame
        plot_data = []
        for coord in self.coords:
            if (coord.coord_type == 'longitude'):
                plot_data.append(frame0.data.lon.to_value(coord.coord_unit))
            elif (coord.coord_type == 'latitude'):
                plot_data.append(frame0.data.lat.to_value(coord.coord_unit))
            else:
                raise NotImplementedError('Coordinates    cannot    be    plotted    with    this    method    because    the    WCS    does    not    represent    longitude/latitude.')
        if ('transform' in kwargs.keys()):
            raise TypeError("The    'transform'    keyword    argument    is    not    allowed,    as    it    is    automatically    determined    by    the    input    coordinate    frame.")
        transform = self.get_transform(frame0)
        kwargs.update({'transform': transform})
        args = (tuple(plot_data) + args[1:])
    super(WCSAxes, self).plot(*args, **kwargs)
