public abstract static class FunctionPlot.SimplePlotFunction extends Object implements FunctionPlot.PlotFunction
PlotFunction
interface.
The only method that has to be implemented is getY()
.Constructor and Description |
---|
SimplePlotFunction()
Constructs a plot function without inter-pixel sampling.
|
SimplePlotFunction(int interPixelSamples)
Constructs a plot function.
|
Modifier and Type | Method and Description |
---|---|
FunctionPlot.GridLine[] |
getHorizontalGridLines(double yMin,
double yMax)
Returns the definition of the horizontal grid lines for the current view.
|
double[] |
getMinMaxY(double x1,
double x2)
Returns a
double[2] array with the minimum and maximum y values within the function range x1 to x2. |
FunctionPlot.GridLine[] |
getVerticalGridLines(double xMin,
double xMax)
Returns the definition of the vertical grid lines for the current view.
|
abstract double |
getY(double x)
Returns an y value for an x value.
|
public SimplePlotFunction()
public SimplePlotFunction(int interPixelSamples)
interPixelSamples
- Number of inter-pixel samples to be computed on each genMinMayY()
call.
0 for no inter-pixel sampling.public abstract double getY(double x)
public double[] getMinMaxY(double x1, double x2)
FunctionPlot.PlotFunction
double[2]
array with the minimum and maximum y values within the function range x1 to x2.
May return null if no values are available.getMinMaxY
in interface FunctionPlot.PlotFunction
public FunctionPlot.GridLine[] getHorizontalGridLines(double yMin, double yMax)
FunctionPlot.PlotFunction
getHorizontalGridLines
in interface FunctionPlot.PlotFunction
yMin
- Minimum y value of the current view.yMax
- Maximum y value of the current view.public FunctionPlot.GridLine[] getVerticalGridLines(double xMin, double xMax)
FunctionPlot.PlotFunction
getVerticalGridLines
in interface FunctionPlot.PlotFunction
xMin
- Minimum x value of the current view.xMax
- Maximum x value of the current view.