当前位置: 首页>>代码示例>>Java>>正文


Java XYChart.setTitle方法代码示例

本文整理汇总了Java中org.knowm.xchart.XYChart.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java XYChart.setTitle方法的具体用法?Java XYChart.setTitle怎么用?Java XYChart.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.knowm.xchart.XYChart的用法示例。


在下文中一共展示了XYChart.setTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: show

import org.knowm.xchart.XYChart; //导入方法依赖的package包/类
public static void show(String chartTitle, NumericColumn xColumn, NumericColumn yColumn, ViewGroup group) {
    XYChart chart = new XYChart(DEFAULT_WIDTH, DEFAULT_HEIGHT);
    chart.setTitle(chartTitle);
    chart.setXAxisTitle(xColumn.name());
    chart.setYAxisTitle(yColumn.name());
    chart.getStyler().setTheme(new TablesawTheme());

    chart.getStyler().setMarkerSize(5);

    chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);

    for (TemporaryView view : group) {
        double[] xData = view.numericColumn(xColumn.name()).toDoubleArray();
        double[] yData = view.numericColumn(yColumn.name()).toDoubleArray();

        chart.addSeries(view.name(), Arrays.copyOf(xData, xData.length), Arrays.copyOf(yData, yData.length));
    }
    new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:20,代码来源:XchartScatter.java

示例2: show

import org.knowm.xchart.XYChart; //导入方法依赖的package包/类
public static void show(String chartTitle, NumericColumn xColumn, NumericColumn yColumn, ViewGroup group) {
    XYChart chart = new XYChart(DEFAULT_WIDTH, DEFAULT_HEIGHT);
    chart.setTitle(chartTitle);
    chart.setXAxisTitle(xColumn.name());
    chart.setYAxisTitle(yColumn.name());
    chart.getStyler().setTheme(new TablesawTheme());

    chart.getStyler().setMarkerSize(5);

    chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);

    for (TemporaryView view : group) {
        double[] xData = view.numericColumn(xColumn.name()).toDoubleArray();
        double[] yData = view.numericColumn(yColumn.name()).toDoubleArray();
        chart.addSeries(view.name(), Arrays.copyOf(xData, xData.length), Arrays.copyOf(yData, yData.length));
    }
    new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:19,代码来源:XchartLine.java

示例3: show

import org.knowm.xchart.XYChart; //导入方法依赖的package包/类
public static void show(String chartTitle, double[] xData, NumericColumn yColumn, int width, int height) {
    double[] yData = yColumn.toDoubleArray();

    // Create Chart
    XYChart chart = new XYChart(width, height);
    chart.setTitle(chartTitle);
    chart.setYAxisTitle(yColumn.name());
    chart.getStyler().setTheme(new TablesawTheme());
    chart.getStyler().setMarkerSize(2);
    chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);

    XYSeries series = chart.addSeries("Ranked: " + yColumn.name(), xData, yData);
    series.setMarker(SeriesMarkers.CIRCLE);
    new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:16,代码来源:XchartQuantile.java


注:本文中的org.knowm.xchart.XYChart.setTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。