def _draw_cursor(ax, x, y, xd=10, yd=-30):
    """Draw an arrow resembling a mouse pointer.

    Used for making figures in the documentation.
    Uses the matplotlib ax.annotate to draw the arrow.

    Parameters
    ----------
    ax : matplotlib subplot
    x, y : scalar
        Coordinates for the point of the cursor. In data
        coordinates for the ax. This point can be outside
        the ax extent.
    xd, yd : scalar, optional
        Size of the cursor, in figure display coordinates.

    Example
    -------
    >>> import matplotlib.pyplot as plt
    >>> fig, ax = plt.subplots()
    >>> cax = ax.imshow(np.random.random((100, 100)))
    >>> import atomap.animation_plotting_tools as apt
    >>> apt._draw_cursor(ax, 20, 50)

    """
    xd, yd = 10, -30
    arrowprops = dict(width=2.9, headwidth=10.3, headlength=15.06,
        edgecolor='white', facecolor='black')
    ax.annotate('', xy=(x, y), xytext=(xd, yd), xycoords='data', textcoords
        ='offset pixels', arrowprops=arrowprops, annotation_clip=False)
