diff --git a/jdaviz/app.py b/jdaviz/app.py index cc4dc0baf6..77f4f431d2 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -617,8 +617,13 @@ def _link_new_data(self, reference_data=None, data_to_be_linked=None): linked_data.ndim < 3 and # Cube linking requires special logic. See below ref_data.ndim < 3) ): - links = [LinkSame(linked_data.components[0], ref_data.components[0]), - LinkSame(linked_data.components[1], ref_data.components[1])] + if self.config == 'specviz2d': + links = [LinkSameWithUnits(linked_data.components[0], ref_data.components[1]), + LinkSameWithUnits(linked_data.components[1], ref_data.components[3])] + else: + links = [LinkSame(linked_data.components[0], ref_data.components[0]), + LinkSame(linked_data.components[1], ref_data.components[1])] + dc.add_link(links) return