Package plotter.xy

Examples of plotter.xy.ScatterXYPlotLine


    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setup();

    XYAxis xAxis = frame.getXAxis();
    XYAxis yAxis = frame.getYAxis();
    final ScatterXYPlotLine line = new ScatterXYPlotLine(xAxis, yAxis);
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    frame.addPlotLine(line);

    yAxis.setStart(-1.2);
    yAxis.setEnd(1.2);
    xAxis.setStart(-1.2);
View Full Code Here


    XYAxis xAxis = frame.getXAxis();
    XYAxis yAxis = frame.getYAxis();
    final long[] paintTime=new long[1];
    final long[] paints=new long[1];
    final ScatterXYPlotLine line = new ScatterXYPlotLine(xAxis, yAxis) {
      int skip;
      @Override
      protected void paintComponent(Graphics g) {
        long start = System.nanoTime();
        super.paintComponent(g);
        if(skip++>1000) {
        paintTime[0] += System.nanoTime() - start;
        paints[0]++;
        }
      }
    };
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setMaxCapacity(1000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    frame.addPlotLine(line);

    yAxis.setStart(-1.2);
    yAxis.setEnd(1.2);
    xAxis.setStart(-1.2);
View Full Code Here

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setup();

    XYAxis xAxis = frame.getXAxis();
    XYAxis yAxis = frame.getYAxis();
    final ScatterXYPlotLine line = new ScatterXYPlotLine(xAxis, yAxis);
    GeneralPath pointShape = new GeneralPath();
    pointShape.moveTo(-5, -5);
    pointShape.lineTo(-5, 5);
    pointShape.lineTo(5, 5);
    pointShape.lineTo(5, -5);
    pointShape.lineTo(-5, -5);
    line.setPointFill(pointShape);
    line.setForeground(Color.white);
    final SimpleXYDataset d = new SimpleXYDataset(line);
    d.setMaxCapacity(1000);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    frame.addPlotLine(line);

    yAxis.setStart(-10);
    yAxis.setEnd(10);
    xAxis.setStart(-10);
View Full Code Here

  public void setMaxPoints(int maxPoints) {
    this.maxPoints = maxPoints;
  }

  public ScatterXYPlotLine addDataset (String key, Color c) {
    ScatterXYPlotLine plotLine = new ScatterXYPlotLine(getXAxis(), getYAxis());
    SimpleXYDataset data = new SimpleXYDataset(plotLine);
    plotLines.put(key, plotLine);
    dataSet.put(key, data);
    contents.add(plotLine);
    plotLine.setForeground(c);
    return plotLine;
 
View Full Code Here

    return null;
  }

  @Override
  public AbstractPlotLine createPlotLine() {
    ScatterXYPlotLine plotterLine =
      new ScatterXYPlotLine(plotPanel.getXAxis(), plotPanel.getYAxis());
    plotterLine.setForeground(Color.PINK);
    SimpleXYDataset data = new SimpleXYDataset(plotterLine);
    plotPanel.getContents().add(plotterLine);
    return new PlotLineWrapper(plotterLine, data);
  }
View Full Code Here

    this.rotated = rotated;
  }
 
  @Override
  public PlotLine createLine() {
    ScatterXYPlotLine plotLine = new ScatterXYPlotLine(plot.getXAxis(), plot.getYAxis());
    SimpleXYDataset data = new SimpleXYDataset(plotLine);
    return new PlotterPlotLine(plotLine, data, rotated);
  }
View Full Code Here

TOP

Related Classes of plotter.xy.ScatterXYPlotLine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.