/** * Constructs a plot frame for the specified plot panel. * @param panel the plot panel. */ public PlotFrame(PlotPanel panel) { _panelTL = panel; _panelBR = panel; _panelMain = new MainPanel(); _panelMain.setLayout(new BorderLayout()); _panelMain.add(_panelTL,BorderLayout.CENTER); this.setSize(_panelMain.getPreferredSize()); this.add(_panelMain,BorderLayout.CENTER); this.setFont(DEFAULT_FONT); this.setBackground(DEFAULT_BACKGROUND); this.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT); addModeManager(); addResizedShownListener(); }
_splitPane.setOneTouchExpandable(true); _panelMain.add(_splitPane,BorderLayout.CENTER); this.setSize(_panelMain.getPreferredSize()); this.add(_panelMain,BorderLayout.CENTER); this.setBackground(DEFAULT_BACKGROUND); this.setFont(DEFAULT_FONT); this.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT); addModeManager(); addResizedShownListener();
PlotFrame frame = new PlotFrame(plot); frame.add(buttPanel,BorderLayout.SOUTH); frame.setSize(600,500); frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE); frame.setVisible(true);
_plotFrame.setSize(PZP_WIDTH,PZP_HEIGHT); _plotFrame.setFontSizeForPrint(8,240); _plotFrame.setVisible(true);
_plotFrame.setSize(RP_WIDTH,RP_HEIGHT); _plotFrame.setFontSizeForPrint(8,240); _plotFrame.setVisible(true);
public static void main(String args[]) { System.out.println("LogAxisPlotDemo2"); int n = 1000; float X = 300; float[] x = ArrayMath.rampfloat(0.0f,X / n,n); float[] f = new float[n]; for (int i = 0; i < n; ++i) { f[i] = pow(1.5f * x[i],2); } // new plot PlotPanel plot = new PlotPanel(2,2); pv1 = plot.addPoints(0,0,x,f); pv2 = plot.addPoints(0,1,x,f); pv3 = plot.addPoints(1,0,x,f); pv4 = plot.addPoints(1,1,x,f); // frame setup plot.setVisible(true); PlotFrame frame = new PlotFrame(plot); frame.setSize(800,500); frame.add(makeScaleOptionPanel(),BorderLayout.EAST); frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE); frame.setVisible(true); }
private static void plot(TriMesh tm) { TriMeshView tmv = new TriMeshView(tm); tmv.setPolysVisible(true); tmv.setTriColor(Color.BLACK); tmv.setPolyColor(Color.BLUE); PlotPanel panel = new PlotPanel(); panel.setHLabel("x"); panel.setVLabel("y"); Mosaic mosaic = panel.getMosaic(); mosaic.getTile(0,0).addTiledView(tmv); PlotFrame frame = new PlotFrame(panel); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(700,700); frame.setVisible(true); } }
private static void demo1() { int n = 50; float[] x1 = randfloat(n); float[] x2 = randfloat(n); float[] x3 = randfloat(n); PlotPanel panel = new PlotPanel(1,1); panel.setLimits(-0.1,-0.1,1.1,1.1); PointsView pv = panel.addPoints(x1,x2,x3); pv.setLineStyle(PointsView.Line.NONE); pv.setMarkStyle(PointsView.Mark.FILLED_CIRCLE); pv.setTextFormat("%4.2f"); PlotFrame frame = new PlotFrame(panel); frame.setSize(800,800); frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE); frame.setVisible(true); //frame.paintToPng(300,6,"junk.png"); } }
private static void go() { int nx = 101; float dx = 0.1f; float fx = -0.5f*dx*(float)(nx-1); Sampling sx = new Sampling(nx,dx,fx); float[] f1 = rampfloat(fx,dx,nx); float[] f2 = add(0.5f,sin(f1)); PlotPanel panel = new PlotPanel(2,1); SequenceView sv1 = panel.addSequence(0,0,sx,f1); sv1.setColor(Color.RED); SequenceView sv2 = panel.addSequence(1,0,sx,f2); sv2.setZero(SequenceView.Zero.MIDDLE); PlotFrame frame = new PlotFrame(panel); frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE); frame.setSize(950,500); frame.setVisible(true); frame.paintToPng(300,6,"junk.png"); } }
public void run() { PlotPanelPixels3 plot = new PlotPanelPixels3( PlotPanelPixels3.Orientation.X1RIGHT, PlotPanelPixels3.AxesPlacement.LEFT_BOTTOM, SX,SX,SX,g); //plot.setSlices(0,0,0); plot.setTitle(method.toString()); plot.setLabel1("x"); plot.setLabel2("y"); plot.setLabel3("z"); plot.addColorBar(); plot.setLineColor(null); plot.setColorModel(ColorMap.JET); plot.setLineColor(Color.BLACK); plot.setInterpolation(PixelsView.Interpolation.NEAREST); plot.setClips(0.0f,1.0f); PlotFrame frame = new PlotFrame(plot); frame.setSize(800,760); frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE); frame.setVisible(true); } });