gpt4 book ai didi

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

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

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

XYChartBuilder.height介绍

暂无

代码示例

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Mercado Order Book")
  .xAxisTitle("BTC")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Bitstamp Order Book")
  .xAxisTitle("BTC")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Bitstamp Order Book")
  .xAxisTitle("BTC")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Cryptopia Order Book")
  .xAxisTitle("BTC")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Real-time Bitstamp Price vs. Time")
  .xAxisTitle("Time")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Mercado Order Book")
  .xAxisTitle("LTC")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Bitstamp Price vs. Date")
  .xAxisTitle("Date")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("C-CEX Order Book - Xaurum")
  .xAxisTitle("BTC")

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

new XYChartBuilder()
  .width(800)
  .height(600)
  .title("Bitcoinium Order Book - BITSTAMP_BTC_USD")
  .xAxisTitle("BTC")

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

public XChartPanel<XYChart> buildPanel() throws IOException {
 System.out.println("fetching data...");
 updateData();
 // create chart
 chart =
   new XYChartBuilder()
     .width(800)
     .height(400)
     .title("Real-time Bitcoinium Order Book - BITSTAMP_BTC_USD")
     .xAxisTitle("BTC")
     .yAxisTitle("USD")
     .build();
 // Customize Chart
 chart.getStyler().setLegendPosition(LegendPosition.InsideNE);
 chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Area);
 // add series
 XYSeries series = chart.addSeries(BIDS_SERIES_NAME, xAxisBidData, yAxisBidData);
 series.setMarker(SeriesMarkers.NONE);
 series = chart.addSeries(ASKS_SERIES_NAME, xAxisAskData, yAxisAskData);
 series.setMarker(SeriesMarkers.NONE);
 return new XChartPanel<>(chart);
}

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

@Override
 public XYChart getChart() {

  // Create Chart
  XYChart chart = new XYChartBuilder().width(800).height(600).title("Logarithmic Data").build();

  // Customize Chart
  chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Scatter);
  chart.getStyler().setXAxisLogarithmic(true);
  chart.getStyler().setLegendPosition(LegendPosition.InsideN);

  // Series
  List<Double> xData = new ArrayList<Double>();
  List<Double> yData = new ArrayList<Double>();
  Random random = new Random();
  int size = 400;
  for (int i = 0; i < size; i++) {
   double nextRandom = random.nextDouble();
   xData.add(Math.pow(10, nextRandom * 10));
   yData.add(1000000000.0 + nextRandom);
  }
  chart.addSeries("logarithmic data", xData, yData);

  return chart;
 }
}

代码示例来源: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

public static void main(String[] args) {

  // Create Chart
  XYChart chart = new XYChartBuilder().width(600).height(400).build();

  // Customize Chart

  // Series
  double[] xData1 = new double[] {0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15};
  double[] yData1 = new double[] {106, 44, 26, 10, 11, 19, 25, Double.NaN, 30, 21, 36, 32, 30};
  double[] xData2 = new double[] {6, 7, 8, 9, 10, 11};
  double[] yData2 = new double[] {25, 54, 43, 56, 33, 30};

  chart.addSeries("A", xData1, yData1);
  chart.addSeries("B", xData2, yData2);

  new SwingWrapper<XYChart>(chart).displayChart();
 }
}

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

public static void main(String[] args) throws IOException {
 int numCharts = 4;
 List<Chart> charts = new ArrayList<Chart>();
 for (int i = 0; i < numCharts; i++) {
  XYChart chart =
    new XYChartBuilder().xAxisTitle("X").yAxisTitle("Y").width(600).height(400).build();
  chart.getStyler().setYAxisMin(-10.0);
  chart.getStyler().setYAxisMax(10.0);
  XYSeries series = chart.addSeries("" + i, null, getRandomWalk(200));
  series.setMarker(SeriesMarkers.NONE);
  charts.add(chart);
 }
 new SwingWrapper<Chart>(charts).displayChartMatrix();
 BitmapEncoder.saveBitmap(charts, 2, 2, "./Sample_Chart_Matrix", BitmapEncoder.BitmapFormat.PNG);
}

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

@Override
 public XYChart getChart() {

  // Create Chart
  XYChart chart =
    new XYChartBuilder()
      .width(800)
      .height(600)
      .title("Single Point")
      .xAxisTitle("X")
      .yAxisTitle("Y")
      .build();

  // Customize Chart
  chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Scatter);

  // Series
  chart.addSeries("single point (1,1)", new double[] {1}, new double[] {1});

  return chart;
 }
}

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

@Override
 public XYChart getChart() {

  // Create Chart
  XYChart chart =
    new XYChartBuilder()
      .width(800)
      .height(600)
      .title(getClass().getSimpleName())
      .xAxisTitle("X")
      .yAxisTitle("Y")
      .build();

  // Customize Chart
  chart.getStyler().setLegendPosition(LegendPosition.InsideNE);
  chart.getStyler().setAxisTitlesVisible(false);
  chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Area);

  // Series
  chart.addSeries("a", new double[] {0, 3, 5, 7, 9}, new double[] {-3, 5, 9, 6, 5});
  chart.addSeries("b", new double[] {0, 2, 4, 6, 9}, new double[] {-1, 6, 4, 0, 4});
  chart.addSeries("c", new double[] {0, 1, 3, 8, 9}, new double[] {-2, -1, 1, 0, 1});

  return chart;
 }
}

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

@Override
 public XYChart getChart() {

  // Create Chart
  XYChart chart =
    new XYChartBuilder()
      .width(800)
      .height(600)
      .title(getClass().getSimpleName())
      .xAxisTitle("X")
      .yAxisTitle("Y")
      .build();

  // Customize Chart
  chart.getStyler().setLegendPosition(LegendPosition.InsideNE);
  chart.getStyler().setAxisTitlesVisible(false);
  chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.StepArea);

  // Series
  chart.addSeries("a", new double[] {0, 3, 5, 7, 9}, new double[] {-3, 5, 9, 6, 5});
  chart.addSeries("b", new double[] {0, 2, 4, 6, 9}, new double[] {-1, 6, 4, 0, 4});
  chart.addSeries("c", new double[] {0, 1, 3, 8, 9}, new double[] {-2, -1, 1, 0, 1});

  return chart;
 }
}

代码示例来源: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

@Override
 public XYChart getChart() {

  // Create Chart
  XYChart chart = new XYChartBuilder().width(800).height(600).build();

  // Customize Chart
  chart.getStyler().setYAxisLogarithmic(true);
  chart.getStyler().setYAxisMin(.08);
  chart.getStyler().setYAxisMax(1000.0);
  chart.getStyler().setErrorBarsColor(Color.black);

  // Series
  int[] xData = new int[] {0, 1, 2, 3, 4, 5, 6};
  int[] yData1 = new int[] {100, 100, 100, 60, 10, 10, 10};
  int[] errdata = new int[] {50, 20, 10, 52, 9, 2, 1};
  XYSeries series1 = chart.addSeries("Error bar\ntest data", xData, yData1, errdata);
  series1.setLineStyle(SeriesLines.SOLID);
  series1.setMarker(SeriesMarkers.DIAMOND);
  series1.setMarkerColor(Color.GREEN);

  return chart;
 }
}

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

public static void main(String[] args) {
 // Create Chart
 XYChart chart =
   new XYChartBuilder()
     .width(600)
     .height(500)
     .title("Gaussian Blobs")
     .xAxisTitle("X")
     .yAxisTitle("Y")
     .build();
 // Customize Chart
 chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Scatter);
 chart.getStyler().setChartTitleVisible(false);
 chart.getStyler().setLegendPosition(LegendPosition.InsideSW);
 chart.getStyler().setMarkerSize(16);
 // Series
 chart.addSeries("Gaussian Blob 1", getGaussian(1000, 1, 10), getGaussian(1000, 1, 10));
 XYSeries series =
   chart.addSeries("Gaussian Blob 2", getGaussian(1000, 1, 10), getGaussian(1000, 0, 5));
 series.setMarker(SeriesMarkers.DIAMOND);
 new SwingWrapper(chart).displayChart();
}

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