org.knowm.xchart.style.XYStyler.setPlotContentSize()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(66)

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

XYStyler.setPlotContentSize介绍

暂无

代码示例

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

chart.getStyler().setSeriesColors(colors);
chart.getStyler().setPlotGridLinesVisible(false);
chart.getStyler().setPlotContentSize(1.0);
new SwingWrapper<XYChart>(chart).displayChart();

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

chart.getStyler().setYAxisDecimalPattern("$ #,###.##");
chart.getStyler().setPlotMargin(0);
chart.getStyler().setPlotContentSize(.95);

代码示例来源:origin: es.ucm.fdi.gaia/jCOLIBRI

private static XYChart getChart(String title, EvaluationReport er) {
  // Create Chart
  XYChart chart = new XYChartBuilder().title("Performance").xAxisTitle("Evaluation").yAxisTitle("Value").build();
   // Customize Chart
  chart.getStyler().setLegendPosition(LegendPosition.OutsideS);
  chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Line);
  chart.getStyler().setYAxisLabelAlignment(Styler.TextAlignment.Right);
  chart.getStyler().setPlotMargin(0);
  chart.getStyler().setPlotContentSize(.95);
   String[] labels = er.getSeriesLabels();
  int lines = labels.length;
  int lineSize = er.getSeries(labels[0]).size();
  
  double[] xAges = new double[lineSize];
  for(int i=0; i<lineSize; i++) xAges[i] = i;
  
  for( int l=0; l<lines; l++)
  {
    Double[] line = er.getSeries(labels[l]).toArray(new Double[0]);
    chart.addSeries(labels[l], xAges, ArrayUtils.toPrimitive(line));
  }
   return chart;
}

相关文章