gpt4 book ai didi

org.knowm.xchart.XYChartBuilder.theme()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 13:13:05 29 4
gpt4 key购买 nike

本文整理了Java中org.knowm.xchart.XYChartBuilder.theme()方法的一些代码示例,展示了XYChartBuilder.theme()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYChartBuilder.theme()方法的具体详情如下:
包路径:org.knowm.xchart.XYChartBuilder
类名称:XYChartBuilder
方法名:theme

XYChartBuilder.theme介绍

暂无

代码示例

代码示例来源:origin: knowm/XChart

.width(800)
.height(600)
.theme(ChartTheme.XChart)
.title("XChart Theme")
.xAxisTitle("X")

代码示例来源:origin: knowm/XChart

@Override
public XYChart getChart() {
 yData = getRandomData(5);
 // Create Chart
 xyChart =
   new XYChartBuilder()
     .width(500)
     .height(400)
     .theme(ChartTheme.Matlab)
     .title("Real-time XY Chart")
     .build();
 xyChart.addSeries(SERIES_NAME, null, yData);
 return xyChart;
}

代码示例来源:origin: knowm/XChart

.width(800)
.height(600)
.theme(ChartTheme.Matlab)
.title("Matlab Theme")
.xAxisTitle("X")

代码示例来源:origin: knowm/XChart

@Override
 public XYChart getChart() {

  // Create Chart
  XYChart chart =
    new XYChartBuilder()
      .width(800)
      .height(600)
      .theme(ChartTheme.GGPlot2)
      .title("GGPlot2 Theme")
      .xAxisTitle("X")
      .yAxisTitle("Y")
      .build();

  // Customize Chart

  // Series
  chart.addSeries("vertical", new double[] {1, 1}, new double[] {-10, 10});
  chart.addSeries("horizontal", new double[] {-10, 10}, new double[] {0, 0});

  return chart;
 }
}

代码示例来源:origin: knowm/XChart

new XYChartBuilder().width(500).height(350).theme(Styler.ChartTheme.Matlab).build();

代码示例来源:origin: signaflo/java-timeseries

/**
 * Plot a data set. This method will produce a scatter plot of the data values against the integers
 * from 0 to n - 1, where n is the size of the data set.
 *
 * @param dataSet the data set to plot.
 */
public static void plot(final DataSet dataSet) {
  Thread plotThread = new Thread(() -> {
    final double[] indices = new double[dataSet.size()];
    for (int i = 0; i < indices.length; i++) {
      indices[i] = i;
    }
    XYChart chart = new XYChartBuilder().theme(Styler.ChartTheme.GGPlot2).
        title("Scatter Plot").xAxisTitle("Index").yAxisTitle("Values").build();
    chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter).
        setChartFontColor(Color.BLACK).setSeriesColors(new Color[]{Color.BLUE});
    chart.addSeries("com/github/signaflo/data", indices, dataSet.asArray());
    JPanel panel = new XChartPanel<>(chart);
    JFrame frame = new JFrame("Data Set");
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
  });
  plotThread.start();
}

代码示例来源:origin: signaflo/java-timeseries

final XYChart chart = new XYChartBuilder().theme(Styler.ChartTheme.GGPlot2)
                     .height(600)
                     .width(800)

代码示例来源:origin: signaflo/java-timeseries

/**
 * Plot the first data set against the second data set. The first data set will be plotted on the x-axis, while
 * the second data set will be plotted on the y-axis.
 *
 * @param firstDataSet the data set to plot on the x-axis.
 * @param secondDataSet the data set to plot against the first data set.
 */
public static void plot(final DataSet firstDataSet, final DataSet secondDataSet) {
  Thread plotThread = new Thread(() -> {
    XYChart chart = new XYChartBuilder().theme(Styler.ChartTheme.GGPlot2)
                      .height(600)
                      .width(800)
                      .title("Scatter Plot")
                      .xAxisTitle("X")
                      .yAxisTitle("Y")
                      .build();
    chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter).
        setChartFontColor(Color.DARK_GRAY).setSeriesColors(new Color[]{Color.BLUE});
    chart.addSeries("Y against X", firstDataSet.asArray(), secondDataSet.asArray());
    JPanel panel = new XChartPanel<>(chart);
    JFrame frame = new JFrame("Scatter Plot");
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
  });
  plotThread.start();
}

代码示例来源:origin: signaflo/java-timeseries

XYChart chart = new XYChartBuilder().theme(Styler.ChartTheme.GGPlot2)
                  .height(800)
                  .width(1200)

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com