/** * Adds a points view of specified values (x,y). * @param x array of x coordinates. * @param y array of y coordinates. * @return the points view. */ public PointsView addPoints(double[] x, double[] y) { return addPoints(convertToFloat(x),convertToFloat(y)); }
/** * Returns a new plot with a points view of specified values (x,y). * @param x array of x coordinates. * @param y array of y coordinates. * @return the plot. */ public static SimplePlot asPoints(double[] x, double[] y) { return SimplePlot.asPoints(convertToFloat(x),convertToFloat(y)); }
/** * Returns a new plot with a points view of a sampled function f(x). * @param s the sampling of the x coordinate. * @param f array of sampled function values f(x). * @return the plot. */ public static SimplePlot asPoints(Sampling s, double[] f) { return SimplePlot.asPoints(s,convertToFloat(f)); }
/** * Returns a new plot with a points view of specified values f(x). * Uses default sampling of x = 0, 1, 2, .... * @param f array of sampled function values f(x). * @return the plot. */ public static SimplePlot asPoints(double[] f) { return SimplePlot.asPoints(convertToFloat(f)); }
/** * Returns a new plot with a sequence view of specified values f(x). * Uses default sampling of x = 0, 1, 2, .... * @param f array of sampled function values f(x). * @return the plot. */ public static SimplePlot asSequence(double[] f) { return SimplePlot.asSequence(convertToFloat(f)); }
/** * Returns a new plot with a pixels view of a sampled function f(x1,x2). * @param s1 the sampling of the x1 coordinate. * @param s2 the sampling of the x2 coordinate. * @param f array[n2][n1] of sampled function values f(x1,x2), where * n1 = f[0].length and n2 = f.length. * @return the plot. */ public static SimplePlot asPixels(Sampling s1, Sampling s2, double[][] f) { return SimplePlot.asPixels(s1,s2,convertToFloat(f)); }
/** * Adds a sequence view with specified sampling and values f(x). * @param s the sampling of the variable x. * @param f array of sampled function values f(x). * @return the sequence view. */ public SequenceView addSequence(Sampling s, double[] f) { return addSequence(s,convertToFloat(f)); }
/** * Returns a new plot with a pixels view of a sampled function f(x1,x2). * Assumes zero first-sample values and unit sampling intervals. * @param f array[n2][n1] of sampled function values f(x1,x2), where * n1 = f[0].length and n2 = f.length. * @return the plot. */ public static SimplePlot asPixels(double[][] f) { return SimplePlot.asPixels(convertToFloat(f)); }
/** * Adds a points view of specified values f(x). * Uses default sampling of x = 0, 1, 2, .... * @param f array of sampled function values f(x). * @return the points view. */ public PointsView addPoints(double[] f) { return addPoints(convertToFloat(f)); }
/** * Adds a pixels view of the specified sampled function f(x1,x2). * Assumes zero first sample values and unit sampling intervals. * @param f array[n2][n1] of sampled function values f(x1,x2), where * n1 = f[0].length and n2 = f.length. * @return the pixels view. */ public PixelsView addPixels(double[][] f) { return addPixels(convertToFloat(f)); }
/** * Adds a contours view of the specified sampled function f(x1,x2). * @param s1 the sampling of the variable x1; must be uniform. * @param s2 the sampling of the variable x2; must be uniform. * @param f array[n2][n1] of sampled function values f(x1,x2), where * n1 = f[0].length and n2 = f.length. * @return the contours view. */ public ContoursView addContours(Sampling s1, Sampling s2, double[][] f) { return addContours(s1,s2,convertToFloat(f)); }
/** * Returns a new plot with a sequence view of a sampled function f(x). * @param s the sampling of the x coordinate. * @param f array of sampled function values f(x). * @return the plot. */ public static SimplePlot asSequence(Sampling s, double[] f) { return SimplePlot.asSequence(s,convertToFloat(f)); }
/** * Adds a points view of a sampled function f(x). * @param s the sampling of the x coordinate. * @param f array of sampled function values f(x). * @return the points view. */ public PointsView addPoints(Sampling s, double[] f) { return addPoints(s,convertToFloat(f)); }
/** * Adds a sequence view with specified values f(x). * Uses default sampling of x = 0, 1, 2, .... * @param f array of sampled function values f(x). * @return the sequence view. */ public SequenceView addSequence(double[] f) { return addSequence(convertToFloat(f)); }
/** * Adds a pixels view of the specified sampled function f(x1,x2). * @param s1 the sampling of the variable x1; must be uniform. * @param s2 the sampling of the variable x2; must be uniform. * @param f array[n2][n1] of sampled function values f(x1,x2), where * n1 = f[0].length and n2 = f.length. * @return the pixels view. */ public PixelsView addPixels(Sampling s1, Sampling s2, double[][] f) { return addPixels(s1,s2,convertToFloat(f)); }
/** * Adds a contours view of the specified sampled function f(x1,x2). * Assumes zero first sample values and unit sampling intervals. * @param f array[n2][n1] of sampled function values f(x1,x2), where * n1 = f[0].length and n2 = f.length. * @return the contours view. */ public ContoursView addContours(double[][] f) { return addContours(convertToFloat(f)); }