/** * Create a plot canvas with the histogram plot of given data. * @param data a sample set. * @param k the number of bins. */ public static PlotCanvas plot(double[] data, int k) { return plot(null, data, k); }
/** * Create a plot canvas with the histogram plot. * @param data a sample set. */ public static PlotCanvas plot(double[] data) { return plot((String) null, data); }
/** * Create a plot canvas with the histogram plot of given data. * @param data a sample set. * @param k the number of bins. */ public static PlotCanvas plot(int[] data, int k) { return plot(null, data, k); }
/** * Create a plot canvas with the histogram plot of given data. * @param data a sample set. * @param breaks an array of size k+1 giving the breakpoints between * histogram cells. Must be in ascending order. */ public static PlotCanvas plot(double[] data, double[] breaks) { return plot(null, data, breaks); }
/** * Create a plot canvas with the histogram plot. * @param data a sample set. */ public static PlotCanvas plot(int[] data) { return plot((String) null, data); }
/** * Create a plot canvas with the histogram plot of given data. * @param id the id of the plot. * @param data a sample set. * @param breaks an array of size k+1 giving the breakpoints between * histogram cells. Must be in ascending order. */ public static PlotCanvas plot(String id, double[] data, double[] breaks) { return plot(id, data, breaks, true); }
/** * Create a plot canvas with the histogram plot of given data. * @param data a sample set. * @param breaks an array of size k+1 giving the breakpoints between * histogram cells. Must be in ascending order. */ public static PlotCanvas plot(int[] data, double[] breaks) { return plot(null, data, breaks); }
public static PlotCanvas create(double[] x, String yTitle) { return smile.plot.Histogram.plot(yTitle, x); }
public static PlotCanvas create(String plotTitle, String xTitle, String yTitle, NumberColumn column) { PlotCanvas canvas = smile.plot.Histogram.plot(column.asDoubleArray()); canvas.setForeground(Color.DARK_GRAY); canvas.setTitle(plotTitle); canvas.setAxisLabel(0, xTitle); canvas.setAxisLabel(1, yTitle); return canvas; }