Set the units for axis. Parameters ---------- u : units tag Notes ----- The units of any shared axis will also be updated.
(self, u)
| 2000 | self._converter = converter |
| 2001 | |
| 2002 | def set_units(self, u): |
| 2003 | """ |
| 2004 | Set the units for axis. |
| 2005 | |
| 2006 | Parameters |
| 2007 | ---------- |
| 2008 | u : units tag |
| 2009 | |
| 2010 | Notes |
| 2011 | ----- |
| 2012 | The units of any shared axis will also be updated. |
| 2013 | """ |
| 2014 | if u == self.units: |
| 2015 | return |
| 2016 | for axis in self._get_shared_axis(): |
| 2017 | axis.units = u |
| 2018 | axis._update_axisinfo() |
| 2019 | axis.callbacks.process('units') |
| 2020 | axis.stale = True |
| 2021 | |
| 2022 | def get_units(self): |
| 2023 | """Return the units for axis.""" |