本文整理汇总了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;未经允许,请勿转载。 |
请发表评论