/** * Constructor. * @param z the data matrix to create contour plot. * @param numLevels the number of contour levels. * @param logScale true to interpolate contour levels in logarithmic scale. */ public Contour(double[][] z, int numLevels, boolean logScale) { this.z = z; this.numLevels = numLevels; this.logScale = logScale; init(); }
/** * Constructor. * @param z the data matrix to create contour plot. */ public Contour(double[][] z) { this.z = z; init(); }
/** * Constructor. * @param z the data matrix to create contour plot. * @param numLevels the number of contour levels. */ public Contour(double[][] z, int numLevels) { this.z = z; this.numLevels = numLevels; init(); }
/** * Constructor. * @param z the data matrix to create contour plot. * @param levels the level values of contours. */ public Contour(double[][] z, double[] levels) { this.z = z; this.levels = levels; init(); }
/** * Constructor. * @param z the data matrix to create contour plot. * @param levels the level values of contours. * @param colors the color for each contour level. */ public Contour(double[][] z, double[] levels, Color[] colors) { this.z = z; this.levels = levels; this.colors = colors; showLevelValue = false; init(); }
/** * Constructor. * @param x the x coordinates of the data grid of z. Must be in ascending order. * @param y the y coordinates of the data grid of z. Must be in ascending order. * @param z the data matrix to create contour plot. * @param numLevels the number of contour levels. */ public Contour(double[] x, double[] y, double[][] z, int numLevels) { if (x.length != z[0].length) { throw new IllegalArgumentException(DIMENSIONS_XZ_DONT_MATCH); } if (y.length != z.length) { throw new IllegalArgumentException(DIMENSIONS_YZ_DONT_MATCH); } this.x = x; this.y = y; this.z = z; this.numLevels = numLevels; init(); }
/** * Constructor. * @param x the x coordinates of the data grid of z. Must be in ascending order. * @param y the y coordinates of the data grid of z. Must be in ascending order. * @param z the data matrix to create contour plot. */ public Contour(double[] x, double[] y, double[][] z) { if (x.length != z[0].length) { throw new IllegalArgumentException(DIMENSIONS_XZ_DONT_MATCH); } if (y.length != z.length) { throw new IllegalArgumentException(DIMENSIONS_YZ_DONT_MATCH); } this.x = x; this.y = y; this.z = z; init(); }
/** * Constructor. * @param x the x coordinates of the data grid of z. Must be in ascending order. * @param y the y coordinates of the data grid of z. Must be in ascending order. * @param z the data matrix to create contour plot. * @param levels the level values of contours. Must be strictly increasing and finite. */ public Contour(double[] x, double[] y, double[][] z, double[] levels) { if (x.length != z[0].length) { throw new IllegalArgumentException(DIMENSIONS_XZ_DONT_MATCH); } if (y.length != z.length) { throw new IllegalArgumentException(DIMENSIONS_YZ_DONT_MATCH); } this.x = x; this.y = y; this.z = z; this.levels = levels; init(); }
/** * Constructor. * @param x the x coordinates of the data grid of z. Must be in ascending order. * @param y the y coordinates of the data grid of z. Must be in ascending order. * @param z the data matrix to create contour plot. * @param numLevels the number of contour levels. * @param logScale true to interpolate contour levels in logarithmical scale. */ public Contour(double[] x, double[] y, double[][] z, int numLevels, boolean logScale) { if (x.length != z[0].length) { throw new IllegalArgumentException(DIMENSIONS_XZ_DONT_MATCH); } if (y.length != z.length) { throw new IllegalArgumentException(DIMENSIONS_YZ_DONT_MATCH); } this.x = x; this.y = y; this.z = z; this.numLevels = numLevels; this.logScale = logScale; init(); }
/** * Constructor. * @param x the x coordinates of the data grid of z. Must be in ascending order. * @param y the y coordinates of the data grid of z. Must be in ascending order. * @param z the data matrix to create contour plot. * @param levels the level values of contours. Must be strictly increasing and finite. * @param colors the color for each contour level. */ public Contour(double[] x, double[] y, double[][] z, double[] levels, Color[] colors) { if (x.length != z[0].length) { throw new IllegalArgumentException(DIMENSIONS_XZ_DONT_MATCH); } if (y.length != z.length) { throw new IllegalArgumentException(DIMENSIONS_YZ_DONT_MATCH); } if (levels.length != colors.length) { throw new IllegalArgumentException("The number of levels and colors don't match."); } this.x = x; this.y = y; this.z = z; this.levels = levels; this.colors = colors; showLevelValue = false; init(); }