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 ad65e98 + 1adcf2a commit fe93c18Copy full SHA for fe93c18
lib/matplotlib/axis.py
@@ -1584,18 +1584,12 @@ def set_units(self, u):
1584
----------
1585
u : units tag
1586
"""
1587
- pchanged = False
1588
- if u is None:
1589
- self.units = None
1590
- pchanged = True
1591
- else:
1592
- if u != self.units:
1593
- self.units = u
1594
1595
- if pchanged:
1596
- self._update_axisinfo()
1597
- self.callbacks.process('units')
1598
- 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')
1599
self.stale = True
1600
1601
def get_units(self):
0 commit comments