def from_xaxis(self, value): if self.axis_has_datelocator(self.axes.xaxis): return num2date(value).replace(tzinfo=None) else: return value