MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_units

Method set_units

lib/matplotlib/axis.py:2002–2020  ·  view source on GitHub ↗

Set the units for axis. Parameters ---------- u : units tag Notes ----- The units of any shared axis will also be updated.

(self, u)

Source from the content-addressed store, hash-verified

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."""

Callers 11

update_unitsMethod · 0.95
default_unitsMethod · 0.80
apply_callbackFunction · 0.80
_process_unit_infoMethod · 0.80
test_numpy_facadeFunction · 0.80
artist_tests.pyFile · 0.80
units_scatter.pyFile · 0.80
bar_unit_demo.pyFile · 0.80

Calls 3

_get_shared_axisMethod · 0.95
_update_axisinfoMethod · 0.80
processMethod · 0.80

Tested by 4

test_numpy_facadeFunction · 0.64