public class Contour extends Plot
Constructor and Description |
---|
Contour(double[][] z)
Constructor.
|
Contour(double[][] z,
double[] levels)
Constructor.
|
Contour(double[][] z,
double[] levels,
java.awt.Color[] colors)
Constructor.
|
Contour(double[][] z,
int numLevels)
Constructor.
|
Contour(double[][] z,
int numLevels,
boolean logScale)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z,
double[] levels)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z,
double[] levels,
java.awt.Color[] colors)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z,
int numLevels)
Constructor.
|
Contour(double[] x,
double[] y,
double[][] z,
int numLevels,
boolean logScale)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
paint(Graphics g)
Draw the component with given graphics object.
|
static PlotCanvas |
plot(double[][] z)
Create a plot canvas with the contour plot of given data.
|
static PlotCanvas |
plot(double[][] z,
double[] levels,
java.awt.Color[] palette)
Create a plot canvas with the contour plot of given data.
|
static PlotCanvas |
plot(double[] x,
double[] y,
double[][] z)
Create a plot canvas with the contour plot of given data.
|
static PlotCanvas |
plot(double[] x,
double[] y,
double[][] z,
double[] levels,
java.awt.Color[] palette)
Create a plot canvas with the contour plot of given data.
|
void |
showLevelValue(boolean b)
Set if show the level value with each contour line.
|
getID, getToolBar, getToolTip, setID
public Contour(double[][] z)
z
- the data matrix to create contour plot.public Contour(double[][] z, int numLevels)
z
- the data matrix to create contour plot.numLevels
- the number of contour levels.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[][] z, double[] levels, java.awt.Color[] colors)
z
- the data matrix to create contour plot.levels
- the level values of contours.colors
- the color for each contour level.public Contour(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 Contour(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.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 Contour(double[] x, double[] y, double[][] z, double[] levels, java.awt.Color[] colors)
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.colors
- the color for each contour level.public void showLevelValue(boolean b)
public void paint(Graphics g)
Shape
public static PlotCanvas plot(double[][] z)
z
- a matrix.public static PlotCanvas plot(double[][] z, double[] levels, java.awt.Color[] palette)
z
- a matrix.public static PlotCanvas plot(double[] x, double[] y, double[][] z)
z
- a matrix.public static PlotCanvas plot(double[] x, double[] y, double[][] z, double[] levels, java.awt.Color[] palette)
z
- a matrix.