Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bb64740 + 2990fd3 commit db7cd7eCopy full SHA for db7cd7e
lib/matplotlib/axis.py
@@ -1508,18 +1508,12 @@ def set_units(self, u):
1508
----------
1509
u : units tag
1510
"""
1511
- pchanged = False
1512
- if u is None:
1513
- self.units = None
1514
- pchanged = True
1515
- else:
1516
- if u != self.units:
1517
- self.units = u
1518
1519
- if pchanged:
1520
- self._update_axisinfo()
1521
- self.callbacks.process('units')
1522
- self.callbacks.process('units finalize')
+ if u == self.units:
+ return
+ self.units = u
+ self._update_axisinfo()
+ self.callbacks.process('units')
+ self.callbacks.process('units finalize')
1523
self.stale = True
1524
1525
def get_units(self):
0 commit comments