• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SeriesMarker类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.xeiam.xchart.SeriesMarker的典型用法代码示例。如果您正苦于以下问题:Java SeriesMarker类的具体用法?Java SeriesMarker怎么用?Java SeriesMarker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SeriesMarker类属于com.xeiam.xchart包,在下文中一共展示了SeriesMarker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addPDFSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public static void addPDFSeries(Chart chart, RealDistribution distribution, String desc, int lowerBound, int upperBound) {
    // generates Log data
    List<Number> xData = new ArrayList<Number>();
    List<Number> yData = new ArrayList<Number>();
    int samples = 100;
    double stepSize = (upperBound - lowerBound) / (double) samples;
    for (double x = lowerBound; x <= upperBound; x += stepSize) {
        try {
            double density = distribution.density(x);
            if (! Double.isInfinite(density) && ! Double.isNaN(density)) {
                xData.add(x);
                yData.add(density);
            }
        } catch (Exception e) {
            // ignore
            // some distributions may reject certain values depending on the parameter settings
        }
    }

    Series series = chart.addSeries(desc, xData, yData);
    series.setMarker(SeriesMarker.NONE);
    series.setLineStyle(new BasicStroke(1.2f));
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:24,代码来源:RealDistributionComparison.java


示例2: addCDFSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public static void addCDFSeries(Chart chart, RealDistribution distribution, String desc, int lowerBound, int upperBound) {
    // generates Log data
    List<Number> xData = new ArrayList<Number>();
    List<Number> yData = new ArrayList<Number>();
    int samples = 100;
    double stepSize = (upperBound - lowerBound) / (double) samples;
    for (double x = lowerBound; x <= upperBound; x += stepSize) {
      double density = distribution.cumulativeProbability(x);
      if (! Double.isInfinite(density) && ! Double.isNaN(density)) {
          xData.add(x);
          yData.add(density);
      }
    }

    Series series = chart.addSeries(desc, xData, yData);
    series.setMarker(SeriesMarker.NONE);
    series.setLineStyle(new BasicStroke(1.2f));
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:19,代码来源:RealDistributionComparison.java


示例3: addPDFSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public static void addPDFSeries(Chart chart, IntegerDistribution distribution, String desc, int lowerBound, int upperBound) {
    // generates Log data
    List<Number> xData = new ArrayList<Number>();
    List<Number> yData = new ArrayList<Number>();
    for (int x = lowerBound; x <= upperBound; x += 1) {
        try {
            double probability = distribution.probability(x);
            if (! Double.isInfinite(probability) && ! Double.isNaN(probability)) {
                xData.add(x);
                yData.add(probability);
            }
        } catch (Exception e) {
            // ignore
            // some distributions may reject certain values depending on the parameter settings
        }
    }

    Series series = chart.addSeries(desc, xData, yData);
    series.setMarker(SeriesMarker.NONE);
    series.setLineStyle(new BasicStroke(1.2f));
}
 
开发者ID:apache,项目名称:commons-math,代码行数:22,代码来源:IntegerDistributionComparison.java


示例4: addCDFSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public static void addCDFSeries(Chart chart, IntegerDistribution distribution, String desc,
                                int lowerBound, int upperBound) {
    // generates Log data
    List<Number> xData = new ArrayList<Number>();
    List<Number> yData = new ArrayList<Number>();
    for (int x = lowerBound; x <= upperBound; x += 1) {
      double density = distribution.cumulativeProbability(x);
      if (! Double.isInfinite(density) && ! Double.isNaN(density)) {
          xData.add(x);
          yData.add(density);
      }
    }

    Series series = chart.addSeries(desc, xData, yData);
    series.setMarker(SeriesMarker.NONE);
    series.setLineStyle(new BasicStroke(1.2f));
}
 
开发者ID:apache,项目名称:commons-math,代码行数:18,代码来源:IntegerDistributionComparison.java


示例5: addUtilizationScatterSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addUtilizationScatterSeries(NumericPairList<? extends Number, ? extends Number> valuePairs,
		String seriesTitle, boolean scale) {
	updateAxisRanges(valuePairs.getKeyMin().doubleValue(), valuePairs.getKeyMax().doubleValue(), 0.0, _100_PERCENT);
	Series scatterSeries;
	NumericPairList<Double, Double> scaledPairs = new NumericPairList<>();

	if (scale) {
		for (NumericPair<? extends Number, ? extends Number> pair : valuePairs) {
			scaledPairs.add(pair.getKey().doubleValue(), pair.getValue().doubleValue() * _100_PERCENT);
		}
		scatterSeries = chart.addSeries(seriesTitle, scaledPairs.getKeyListAsNumbers(),
				scaledPairs.getValueListAsNumbers());
	} else {
		scatterSeries = chart.addSeries(seriesTitle, valuePairs.getKeyListAsNumbers(),
				valuePairs.getValueListAsNumbers());
	}

	scatterSeries.setLineStyle(SeriesLineStyle.NONE);
	scatterSeries.setMarker(SeriesMarker.SQUARE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:23,代码来源:XChartBuilder.java


示例6: addUtilizationLineSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addUtilizationLineSeries(NumericPairList<? extends Number, ? extends Number> valuePairs,
		String seriesTitle, boolean scale) {
	updateAxisRanges(valuePairs.getKeyMin().doubleValue(), valuePairs.getKeyMax().doubleValue(), 0.0, _100_PERCENT);
	Series scatterSeries;
	NumericPairList<Double, Double> scaledPairs = new NumericPairList<>();

	if (scale) {
		for (NumericPair<? extends Number, ? extends Number> pair : valuePairs) {
			scaledPairs.add(pair.getKey().doubleValue(), pair.getValue().doubleValue() * _100_PERCENT);
		}
		scatterSeries = chart.addSeries(seriesTitle, scaledPairs.getKeyListAsNumbers(),
				scaledPairs.getValueListAsNumbers());
	} else {
		scatterSeries = chart.addSeries(seriesTitle, valuePairs.getKeyListAsNumbers(),
				valuePairs.getValueListAsNumbers());
	}
	scatterSeries.setLineStyle(SeriesLineStyle.DASH_DASH);
	scatterSeries.setMarker(SeriesMarker.SQUARE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:22,代码来源:XChartBuilder.java


示例7: addTrend

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
private static void addTrend(final Chart chart, final Series series, final List<Object> xdata) {
    final SimpleRegression model = new SimpleRegression();
    final Iterator<? extends Number> y = series.getYData().iterator();
    for (int x = 0; y.hasNext(); x++) {
        model.addData(x, y.next().doubleValue());
    }
    final Color mc = series.getMarkerColor();
    final Color c = new Color(mc.getRed(), mc.getGreen(), mc.getBlue(), 0x60);
    final Series trend = chart.addSeries(series.getName() + " (trend)",
            Arrays.asList(xdata.get(0), xdata.get(xdata.size() - 1)),
            Arrays.asList(model.predict(0), model.predict(xdata.size() - 1))
        );
    trend.setLineColor(c);
    trend.setMarker(SeriesMarker.NONE);
}
 
开发者ID:cardillo,项目名称:joinery,代码行数:16,代码来源:Display.java


示例8: addScatterSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addScatterSeries(NumericPairList<? extends Number, ? extends Number> valuePairs, String seriesTitle) {
	updateAxisRanges(valuePairs);
	Series scatterSeries = chart.addSeries(seriesTitle, valuePairs.getKeyListAsNumbers(),
			valuePairs.getValueListAsNumbers());
	scatterSeries.setLineStyle(SeriesLineStyle.NONE);
	scatterSeries.setMarker(SeriesMarker.CIRCLE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:10,代码来源:XChartBuilder.java


示例9: addScatterSeriesWithErrorBars

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addScatterSeriesWithErrorBars(NumericPairList<? extends Number, ? extends Number> valuePairs,
		List<Number> errors, String seriesTitle) {
	updateAxisRanges(valuePairs);
	Series scatterSeries = chart.addSeries(seriesTitle, valuePairs.getKeyListAsNumbers(),
			valuePairs.getValueListAsNumbers(), errors);
	scatterSeries.setLineStyle(SeriesLineStyle.NONE);
	scatterSeries.setMarker(SeriesMarker.CIRCLE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:11,代码来源:XChartBuilder.java


示例10: addLineSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addLineSeries(NumericPairList<? extends Number, ? extends Number> valuePairs, String seriesTitle) {
	updateAxisRanges(valuePairs);
	Series scatterSeries = chart.addSeries(seriesTitle, valuePairs.getKeyListAsNumbers(),
			valuePairs.getValueListAsNumbers());
	scatterSeries.setLineStyle(SeriesLineStyle.SOLID);
	scatterSeries.setMarker(SeriesMarker.NONE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:10,代码来源:XChartBuilder.java


示例11: addCDFSeries

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addCDFSeries(Collection<? extends Number> values, String seriesTitle) {
	updateAxisRanges(LpeNumericUtils.min(values).doubleValue(), LpeNumericUtils.max(values).doubleValue(), 0.0,
			100.0);
	int size = values.size();
	List<Number> xValues = new ArrayList<>(size);
	List<Number> yValues = new ArrayList<>(size);

	xValues.addAll(values);

	Collections.sort(xValues, new Comparator<Number>() {
		@Override
		public int compare(Number o1, Number o2) {
			if (o1.doubleValue() < o2.doubleValue()) {
				return -1;
			} else if (o1.doubleValue() == o2.doubleValue()) {
				return 0;
			} else {
				return 1;
			}
		}
	});

	double inc = 100.0 / (double) size;
	double sum = 0.0;
	for (int i = 0; i < xValues.size(); i++) {
		sum += inc;
		yValues.add(sum);
	}

	Series scatterSeries = chart.addSeries(seriesTitle, xValues, yValues);
	scatterSeries.setLineStyle(SeriesLineStyle.SOLID);
	scatterSeries.setMarker(SeriesMarker.NONE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:36,代码来源:XChartBuilder.java


示例12: addHorizontalLine

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addHorizontalLine(double yValue, String seriesTitle) {
	double[] xValues = new double[2];
	double[] yValues = new double[2];
	xValues[0] = xMin;
	xValues[1] = xMax;
	yValues[0] = yValue;
	yValues[1] = yValue;
	Series scatterSeries = chart.addSeries(seriesTitle, xValues, yValues);
	scatterSeries.setLineStyle(SeriesLineStyle.SOLID);
	scatterSeries.setMarker(SeriesMarker.NONE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:14,代码来源:XChartBuilder.java


示例13: addVerticalLine

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public void addVerticalLine(double xValue, String seriesTitle) {
	double[] xValues = new double[2];
	double[] yValues = new double[2];
	xValues[0] = xValue;
	xValues[1] = xValue;
	yValues[0] = yMin;
	yValues[1] = yMax;
	Series scatterSeries = chart.addSeries(seriesTitle, xValues, yValues);
	scatterSeries.setLineStyle(SeriesLineStyle.SOLID);
	scatterSeries.setMarker(SeriesMarker.NONE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:14,代码来源:XChartBuilder.java


示例14: addScatterSeriesWithLine

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
@Override
public void addScatterSeriesWithLine(NumericPairList<? extends Number, ? extends Number> valuePairs,
		String seriesTitle) {
	updateAxisRanges(valuePairs);
	Series scatterSeries = chart.addSeries(seriesTitle, valuePairs.getKeyListAsNumbers(),
			valuePairs.getValueListAsNumbers());
	scatterSeries.setLineStyle(SeriesLineStyle.SOLID);
	scatterSeries.setMarker(SeriesMarker.CIRCLE);
	scatterSeries.setMarkerColor(COLORS[seriesCounter % COLORS.length]);
	seriesCounter++;
	
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:13,代码来源:XChartBuilder.java


示例15: getMarker

import com.xeiam.xchart.SeriesMarker; //导入依赖的package包/类
public SeriesMarker getMarker() {
	return MarkerInput.get();
}
 
开发者ID:CompEvol,项目名称:beastshell,代码行数:4,代码来源:Series.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IDEInternalPreferences类代码示例发布时间:2022-05-23
下一篇:
Java Story类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap