public void SetYExtent(RangeD ex) { // recalculate Y axis, update the view extent and redraw _axes.YAxis.Initialise(ex.Min, ex.Max, _origin.Y, _noOfTicks); _vr.SetYExtent(new RangeD(_axes.YAxis.Min, _axes.YAxis.Max)); Replot(); }
// rough calculate min and max values public RangeD Range(RangeD r) { double min = Double.MaxValue; double max = Double.MinValue; double x = r.Min; double xd = r.Size / 500.0; while (x < r.Max) { double v = f(x); min = Math.Min(min, v); max = Math.Max(max, v); x += xd; } return(new RangeD(min, max)); }
public void SetYExtent(RangeD ex) { _y.Zoom(ex.Min, ex.Max); }
public void SetXExtent(RangeD ex) { _x.Zoom(ex.Min, ex.Max); }