diff --git a/changelog/578.bugfix.rst b/changelog/578.bugfix.rst new file mode 100644 index 000000000..a6276b630 --- /dev/null +++ b/changelog/578.bugfix.rst @@ -0,0 +1,2 @@ +Fix a bug where ``data_unit`` was not being correctly passed through to the underlying plotting +function when animating a cube. diff --git a/ndcube/visualization/mpl_plotter.py b/ndcube/visualization/mpl_plotter.py index 940e4f6e1..4916d1974 100644 --- a/ndcube/visualization/mpl_plotter.py +++ b/ndcube/visualization/mpl_plotter.py @@ -86,7 +86,7 @@ def plot(self, axes=None, plot_axes=None, axes_coordinates=None, else: ax = self._animate_cube(plot_wcs, plot_axes=plot_axes, axes_coordinates=axes_coordinates, - axes_units=axes_units, **kwargs) + axes_units=axes_units, data_unit=data_unit, **kwargs) return ax