diff options
Diffstat (limited to 'pint/matplotlib.py')
-rw-r--r-- | pint/matplotlib.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pint/matplotlib.py b/pint/matplotlib.py index ea88c70..25c257b 100644 --- a/pint/matplotlib.py +++ b/pint/matplotlib.py @@ -36,15 +36,15 @@ class PintConverter(matplotlib.units.ConversionInterface): """Convert :`Quantity` instances for matplotlib to use.""" if iterable(value): return [self._convert_value(v, unit, axis) for v in value] - else: - return self._convert_value(value, unit, axis) + + return self._convert_value(value, unit, axis) def _convert_value(self, value, unit, axis): """Handle converting using attached unit or falling back to axis units.""" if hasattr(value, "units"): return value.to(unit).magnitude - else: - return self._reg.Quantity(value, axis.get_units()).to(unit).magnitude + + return self._reg.Quantity(value, axis.get_units()).to(unit).magnitude @staticmethod def axisinfo(unit, axis): |