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.
1 parent c07b48e commit 84ede56Copy full SHA for 84ede56
lib/matplotlib/axis.py
@@ -823,6 +823,9 @@ def _update_axisinfo(self):
823
label.set_text(info.label)
824
825
def convert_units(self, x):
826
+ if self.converter is None:
827
+ self.converter = units.registry.get_converter(x)
828
+
829
if self.converter is None:
830
#print 'convert_units returning identity: units=%s, converter=%s'%(self.units, self.converter)
831
return x
@@ -840,7 +843,6 @@ def set_units(self, u):
840
843
pchanged = False
841
844
if u is None:
842
845
self.units = None
- self.converter = None
846
pchanged = True
847
else:
848
if u!=self.units:
0 commit comments