def autoscale(self):
dmin, dmax = self.datalim_to_dt()<EOL>ymin = self.base.le(dmin.year)<EOL>ymax = self.base.ge(dmax.year)<EOL>vmin = dmin.replace(year=ymin, **self.replaced)<EOL>vmax = dmax.replace(year=ymax, **self.replaced)<EOL>vmin = date2num(vmin)<EOL>vmax = date2num(vmax)<EOL>return self.nonsingular(vmin, vmax)<EOL>
Set the view limits to include the data range.