summaryrefslogtreecommitdiff
path: root/pint/matplotlib.py
diff options
context:
space:
mode:
authorHernan <hernan.grecco@gmail.com>2019-12-27 01:48:51 -0300
committerHernan <hernan.grecco@gmail.com>2019-12-27 01:50:26 -0300
commit511efdd9f5eb2fb030cab4f46314dcf74e27b799 (patch)
tree03bb5c1ba298524f2559ca18490d6b7faf0e547e /pint/matplotlib.py
parent758a23a559338b8bedcc3dcf7f7567d378fe6c9b (diff)
downloadpint-511efdd9f5eb2fb030cab4f46314dcf74e27b799.tar.gz
Manual edits after pyment
Diffstat (limited to 'pint/matplotlib.py')
-rw-r--r--pint/matplotlib.py56
1 files changed, 3 insertions, 53 deletions
diff --git a/pint/matplotlib.py b/pint/matplotlib.py
index 68a74fc..9124742 100644
--- a/pint/matplotlib.py
+++ b/pint/matplotlib.py
@@ -31,19 +31,6 @@ class PintConverter(matplotlib.units.ConversionInterface):
def convert(self, value, unit, axis):
"""Convert :`Quantity` instances for matplotlib to use.
-
- Parameters
- ----------
- value :
-
- unit :
-
- axis :
-
-
- Returns
- -------
-
"""
if iterable(value):
return [self._convert_value(v, unit, axis) for v in value]
@@ -52,19 +39,6 @@ class PintConverter(matplotlib.units.ConversionInterface):
def _convert_value(self, value, unit, axis):
"""Handle converting using attached unit or falling back to axis units.
-
- Parameters
- ----------
- value :
-
- unit :
-
- axis :
-
-
- Returns
- -------
-
"""
if hasattr(value, "units"):
return value.to(unit).magnitude
@@ -73,37 +47,13 @@ class PintConverter(matplotlib.units.ConversionInterface):
@staticmethod
def axisinfo(unit, axis):
- """
+ """Return axis information for this particular unit."""
- Parameters
- ----------
- unit :
-
- axis :
-
-
- Returns
- -------
- type
-
-
- """
return PintAxisInfo(unit)
@staticmethod
def default_units(x, axis):
"""Get the default unit to use for the given combination of unit and axis.
-
- Parameters
- ----------
- x :
-
- axis :
-
-
- Returns
- -------
-
"""
if iterable(x) and sized(x):
return getattr(x[0], "units", None)
@@ -116,9 +66,9 @@ def setup_matplotlib_handlers(registry, enable):
Parameters
----------
registry : UnitRegistry
- the registry that will be used
+ The registry that will be used.
enable : bool
- whether support should be enabled or disabled
+ Whether support should be enabled or disabled.
Returns
-------