# Buggy code
def updatefig(i, im, annotate, ani_data, removes):
    while removes:
        removes.pop(0).remove()

    im.set_array(ani_data[i].data)
    im.set_cmap(ani_data[i].plot_settings["cmap"])

    norm = deepcopy(ani_data[i].plot_settings["norm"])
    # The following explicit call is for bugged versions of Astropy's
    # ImageNormalize
    norm.autoscale_None(ani_data[i].data)
    im.set_norm(norm)

    if wcsaxes_compat.is_wcsaxes(axes):
        im.axes.reset_wcs(ani_data[i].wcs)
        wcsaxes_compat.default_wcs_grid(axes)
    else:
        im.set_extent(
            np.concatenate((ani_data[i].xrange.value, ani_data[i].yrange.value))
        )

    if annotate:
        annotate_frame(i)
    removes += list(plot_function(fig, axes, ani_data[i]))


# Traceback (TypeError)
TypeError                                 Traceback (most recent call last)
<ipython-input-18-ab15991fbba2> in <module>()
12 ani = map_cube.plot()
13 #ani = map_cube.peek().get_animation() # This works but have progress bars cover axis
---> 14 ani.save('test.mp4')

~/.virtualenvs/gen/lib/python3.6/site-packages/matplotlib/animation.py in save(self, filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, savefig_kwargs)
1193                 for anim in all_anim:
1194                     # Clear the initial frame
-> 1195                     anim._init_draw()
1196                 for data in zip(*[a.new_saved_frame_seq() for a in all_anim]):
1197                     for anim, d in zip(all_anim, data):

~/.virtualenvs/gen/lib/python3.6/site-packages/matplotlib/animation.py in _init_draw(self)
1748         # artists.
1749         if self._init_func is None:
-> 1750             self._draw_frame(next(self.new_frame_seq()))
1751
1752         else:

~/.virtualenvs/gen/lib/python3.6/site-packages/matplotlib/animation.py in _draw_frame(self, framedata)
1770         # Call the func with framedata and args. If blitting is desired,
1771         # func needs to return a sequence of any artists that were modified.
-> 1772         self._drawn_artists = self._func(framedata, *self._args)
1773         if self._blit:
1774             if self._drawn_artists is None:

~/.virtualenvs/gen/lib/python3.6/site-packages/sunpy/map/mapcube.py in updatefig(i, im, annotate, ani_data, removes)
206             if wcsaxes_compat.is_wcsaxes(axes):
207                 im.axes.reset_wcs(ani_data[i].wcs)
--> 208                 wcsaxes_compat.default_wcs_grid(axes)
209             else:
210                 im.set_extent(np.concatenate((ani_data[i].xrange.value,

TypeError: default_wcs_grid() missing 2 required positional arguments: 'units' and 'ctypes'

# Fixed code
def updatefig(i, im, annotate, ani_data, removes):
    while removes:
        removes.pop(0).remove()

    im.set_array(ani_data[i].data)
    im.set_cmap(ani_data[i].plot_settings["cmap"])

    norm = deepcopy(ani_data[i].plot_settings["norm"])
    # The following explicit call is for bugged versions of Astropy's
    # ImageNormalize
    norm.autoscale_None(ani_data[i].data)
    im.set_norm(norm)

    if wcsaxes_compat.is_wcsaxes(axes):
        im.axes.reset_wcs(ani_data[i].wcs)
        wcsaxes_compat.default_wcs_grid(
            axes, ani_data[i].spatial_units, ani_data[i].coordinate_system
        )
    else:
        im.set_extent(
            np.concatenate((ani_data[i].xrange.value, ani_data[i].yrange.value))
        )

    if annotate:
        annotate_frame(i)
    removes += list(plot_function(fig, axes, ani_data[i]))