class ZoomEstimator extends Estimator {

    @Override
    public void run(XYPlot plot, XYSeriesBundle sf) {
        if(sf.getSeries() instanceof SampledXYSeries) {
            SampledXYSeries oxy = (SampledXYSeries) sf.getSeries();
            final double factor = calculateZoom(oxy, plot.getBounds());
            oxy.setZoomFactor(factor);
        }
    }

}