public class Contour extends Plot
Constructor and Description |
---|
Contour(double[][] z,
double[] levels)
Constructor.
|
Contour(double[][] z,
int numLevels,
boolean logScale)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z,
double[] levels)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z,
int numLevels,
boolean logScale)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Canvas |
canvas()
Returns a canvas of the plot.
|
double[] |
getLowerBound()
Returns the lower bound of data.
|
double[] |
getUpperBound()
Returns the upper bound of data.
|
static Contour |
of(double[][] z)
Creates a contour plot with 10 isolines.
|
static Contour |
of(double[][] z,
int numLevels)
Creates a contour plot.
|
static Contour |
of(double[] x,
double[] y,
double[][] z)
Creates a contour plot with 10 isolines.
|
static Contour |
of(double[] x,
double[] y,
double[][] z,
int numLevels)
Creates a contour plot.
|
void |
paint(Graphics g)
Draws the shape.
|
public Contour(double[][] z, int numLevels, boolean logScale)
z
- the data matrix to create contour plot.numLevels
- the number of contour levels.logScale
- true to interpolate contour levels in logarithmic scale.public Contour(double[][] z, double[] levels)
z
- the data matrix to create contour plot.levels
- the level values of contours.public Contour(double[] x, double[] y, double[][] z, int numLevels, boolean logScale)
x
- the x coordinates of the data grid of z. Must be in ascending order.y
- the y coordinates of the data grid of z. Must be in ascending order.z
- the data matrix to create contour plot.numLevels
- the number of contour levels.logScale
- true to interpolate contour levels in logarithmical scale.public Contour(double[] x, double[] y, double[][] z, double[] levels)
x
- the x coordinates of the data grid of z. Must be in ascending order.y
- the y coordinates of the data grid of z. Must be in ascending order.z
- the data matrix to create contour plot.levels
- the level values of contours. Must be strictly increasing and finite.public double[] getLowerBound()
Plot
getLowerBound
in class Plot
public double[] getUpperBound()
Plot
getUpperBound
in class Plot
public static Contour of(double[][] z)
z
- the data matrix to create contour plot.public static Contour of(double[][] z, int numLevels)
z
- the data matrix to create contour plot.numLevels
- the number of contour levels.public static Contour of(double[] x, double[] y, double[][] z)
x
- the x coordinates of the data grid of z. Must be in ascending order.y
- the y coordinates of the data grid of z. Must be in ascending order.z
- the data matrix to create contour plot.public static Contour of(double[] x, double[] y, double[][] z, int numLevels)
x
- the x coordinates of the data grid of z. Must be in ascending order.y
- the y coordinates of the data grid of z. Must be in ascending order.z
- the data matrix to create contour plot.numLevels
- the number of contour levels.