Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed May 4, 2023
1 parent 91bc4f1 commit d8897f3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions yt/visualization/plot_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,20 +705,6 @@ def _get_axes_unit_labels(self, unit_x, unit_y):
comoving = False
hinv = False
for i, un in enumerate((unit_x, unit_y)):
unn = None
if hasattr(self.data_source, "axis"):
# TODO(4179): remove this (only used for spectral cube)
if hasattr(self.ds.coordinates, "default_unit_label"):
axax = getattr(self.ds.coordinates, f"{'xy'[i]}_axis")[
self.data_source.axis
]
unn = self.ds.coordinates.default_unit_label.get(axax, None)
if unn in (1, "1", "dimensionless"):
axes_unit_labels[i] = ""
continue
if unn is not None:
axes_unit_labels[i] = _get_units_label(unn).strip("$")
continue
# Use sympy to factor h out of the unit. In this context 'un'
# is a string, so we call the Unit constructor.
expr = Unit(un, registry=self.ds.unit_registry).expr
Expand Down

0 comments on commit d8897f3

Please sign in to comment.