Exemplo n.º 1
0
  /**
   * Creates a plot of the TimeSeries TS. Labels the graph with the given TITLE, XLABEL, YLABEL, and
   * LEGEND.
   */
  public static void plotTS(
      TimeSeries ts, String title, String xlabel, String ylabel, String legend) {
    Collection years = ts.years();
    Collection counts = ts.data();

    // Create Chart
    Chart chart = QuickChart.getChart(title, ylabel, xlabel, legend, years, counts);

    // Show it
    new SwingWrapper(chart).displayChart();
  }
Exemplo n.º 2
0
  public static void main(String[] args) throws Exception {

    //        координаты графика
    double[] xData = new double[] {0.0, 2.0, 5.0};
    double[] yData = new double[] {2.0, 1.6, 0.0};

    //         Create Chart
    Chart chart = QuickChart.getChart("Sample Chart", "X", "Y", "y(x)", xData, yData);

    //         Show it
    new SwingWrapper(chart).displayChart();
  }
Exemplo n.º 3
0
 @Override
 protected Chart generateChart(Color color) {
   return QuickChart.getChart(getName(), "X", "Y", "y(x)", xData, yData);
 }