public void actionPerformed(ActionEvent action) { if (combopc.getSelectedItem()=="JET") { pv2.setColorModel(ColorMap.JET); } else if (combopc.getSelectedItem()=="HUE") { pv2.setColorModel(ColorMap.HUE); } else if (combopc.getSelectedItem()=="GRAY") { pv2.setColorModel(ColorMap.GRAY); } } });
/** * Sets the index color model for this panel. * The default color model is a black-to-white gray model. * @param colorModel the index color model. */ public void setColorModel(IndexColorModel colorModel) { if (_nc==1) { _colorMap.setColorModel(colorModel); _p12.setColorModel(colorModel); _p13.setColorModel(colorModel); _p23.setColorModel(colorModel); } }
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); } }
PixelsView pv0 = panel.addPixels(0,0,f); pv0.setInterpolation(PixelsView.Interpolation.NEAREST); pv0.setColorModel(ColorMap.JET); pv0.setPercentiles(0.0f,100.0f); f = mul(10.0f,f); pv0b.setColorModel(ColorMap.GRAY); pv0b.setPercentiles(0.0f,100.0f); pv1.setColorModel(ColorMap.GRAY); pv1.setPercentiles(0.0f,100.0f); f = mul(10.0f,f); pv1b.setColorModel(ColorMap.JET); pv1b.setPercentiles(0.0f,100.0f);
_pixels.setColorModel(icm); Sampling s1 = new Sampling(1); Sampling s2 = vs;
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); } });
pxv0.setColorModel(ColorMap.GRAY); pxv1.setColorModel(ColorMap.JET);
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); } });