/** * 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 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)); }
/** * 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, float[][] f) { SimplePlot plot = new SimplePlot(Origin.UPPER_LEFT); PixelsView pv = plot.addPixels(s1,s2,f); pv.setInterpolation(PixelsView.Interpolation.NEAREST); return plot; }
/** * 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(float[][] f) { SimplePlot plot = new SimplePlot(Origin.UPPER_LEFT); PixelsView pv = plot.addPixels(f); pv.setInterpolation(PixelsView.Interpolation.NEAREST); return plot; }
private static void plot(float[][] f) { trace("plot f min="+ min(f)+" max="+max(f)); edu.mines.jtk.mosaic.SimplePlot sp = new edu.mines.jtk.mosaic.SimplePlot( edu.mines.jtk.mosaic.SimplePlot.Origin.UPPER_LEFT); sp.setSize(920,900); edu.mines.jtk.mosaic.PixelsView pv = sp.addPixels(f); pv.setColorModel(edu.mines.jtk.awt.ColorMap.JET); pv.setInterpolation(edu.mines.jtk.mosaic.PixelsView.Interpolation.NEAREST); } }
private static void plot(float[][] f) { trace("plot f min="+ min(f)+" max="+max(f)); edu.mines.jtk.mosaic.SimplePlot sp = new edu.mines.jtk.mosaic.SimplePlot( edu.mines.jtk.mosaic.SimplePlot.Origin.UPPER_LEFT); sp.setSize(920,900); edu.mines.jtk.mosaic.PixelsView pv = sp.addPixels(f); pv.setColorModel(edu.mines.jtk.awt.ColorMap.JET); pv.setInterpolation(edu.mines.jtk.mosaic.PixelsView.Interpolation.NEAREST); } }
public void run() { System.out.println("min="+ min(g)+" max="+ max(g)); SimplePlot sp = new SimplePlot(); sp.setTitle(method); sp.setSize(847,740); sp.addColorBar(); sp.getPlotPanel().setColorBarWidthMinimum(100); PixelsView pv = sp.addPixels(SX,SX,g); pv.setColorModel(ColorMap.JET); pv.setInterpolation(PixelsView.Interpolation.LINEAR); if (cmin<cmax) pv.setClips(cmin,cmax); PointsView px = sp.addPoints(x1,x2); px.setLineStyle(PointsView.Line.NONE); px.setMarkStyle(PointsView.Mark.FILLED_CIRCLE); px.setMarkSize(6); } });
public void run() { System.out.println("min="+ min(g)+" max="+ max(g)); SimplePlot sp = new SimplePlot(); sp.setTitle(method); sp.setSize(847,740); sp.addColorBar(); sp.getPlotPanel().setColorBarWidthMinimum(100); PixelsView pv = sp.addPixels(SX,SX,g); pv.setColorModel(ColorMap.JET); pv.setInterpolation(PixelsView.Interpolation.LINEAR); if (cmin<cmax) pv.setClips(cmin,cmax); PointsView px = sp.addPoints(x1,x2); px.setLineStyle(PointsView.Line.NONE); px.setMarkStyle(PointsView.Mark.FILLED_CIRCLE); px.setMarkSize(6); } });