Package plotter.xy

Examples of plotter.xy.DefaultCompressor


    xAxis.setTickMarkCalculator(new TimeTickMarkCalculator());
    xAxis.setFormat(new DateNumberFormat(new SimpleDateFormat("yyyy-MM-dd\nHH:mm:ss.SSS")));

    final LinearXYPlotLine line = new LinearXYPlotLine(xAxis, yAxis, XYDimension.X);
    line.setForeground(Color.white);
    final CompressingXYDataset d = new CompressingXYDataset(line, new DefaultCompressor());
    d.setTruncationPoint(0);
    d.setXData(line.getXData());
    d.setYData(line.getYData());
    final XYMarkerLine marker = new XYMarkerLine(xAxis, 60);
    marker.setForeground(Color.yellow);
View Full Code Here


  }


  private static void compress(JPanel compressedContents, final SimpleXYDataset d, final SimpleXYDataset d2) {
    double scale = 10000.0 / compressedContents.getWidth();
    DefaultCompressor compressor = new DefaultCompressor();
    PointData input = new PointData(d.getXData(), d.getYData());
    PointData output = new PointData();
    compressor.compress(input, output, 0, scale);
    int size = d.getPointCount();
    int size2 = output.getX().getLength();
    DoubleData x = output.getX();
    DoubleData y = output.getY();
    d2.removeAllPoints();
View Full Code Here

  private void setupDataSet(String dataSetName) {

    assert plot.getPlotView() != null : "Plot Object not initalized";
    assert linePlot != null;

    dataset = new CompressingXYDataset(linePlot, new DefaultCompressor());
    // Listen for min/max changes on the non-time axis
    if(plot.getAxisOrientationSetting() == AxisOrientationSetting.X_AXIS_AS_TIME) {
      dataset.addYMinMaxChangeListener(this);
    } else {
      dataset.addXMinMaxChangeListener(this);
View Full Code Here

  }
 
  @Override
  public PlotLine createLine() {
    LinearXYPlotLine plotLine = new LinearXYPlotLine(plot.getXAxis(), plot.getYAxis(), rotated ? XYDimension.Y : XYDimension.X);
    XYDataset data = new CompressingXYDataset(plotLine, new DefaultCompressor());
    return new PlotterPlotLine(plotLine, data, rotated);
  }
View Full Code Here

TOP

Related Classes of plotter.xy.DefaultCompressor

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.