本文整理汇总了Java中org.knowm.xchart.BitmapEncoder.saveBitmap方法的典型用法代码示例。如果您正苦于以下问题:Java BitmapEncoder.saveBitmap方法的具体用法?Java BitmapEncoder.saveBitmap怎么用?Java BitmapEncoder.saveBitmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.knowm.xchart.BitmapEncoder
的用法示例。
在下文中一共展示了BitmapEncoder.saveBitmap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: plot99
import org.knowm.xchart.BitmapEncoder; //导入方法依赖的package包/类
private void plot99(List<Double> xData, List<Double> yData) throws IOException {
XYChart chart = buildCommonChart();
/*
* This shows only the > 90 percentile, so set te minimum
* accordingly.
*/
chart.getStyler().setXAxisMin(99.0);
// Series
XYSeries series = chart.addSeries(chartProperties.getSeriesName(), xData, yData);
series.setLineColor(XChartSeriesColors.BLUE);
series.setMarkerColor(Color.LIGHT_GRAY);
series.setMarker(SeriesMarkers.NONE);
series.setLineStyle(SeriesLines.SOLID);
BitmapEncoder.saveBitmap(chart, baseName + "_99.png", BitmapEncoder.BitmapFormat.PNG);
}
示例2: plot90
import org.knowm.xchart.BitmapEncoder; //导入方法依赖的package包/类
private void plot90(List<Double> xData, List<Double> yData) throws IOException {
XYChart chart = buildCommonChart();
/*
* This shows only the > 90 percentile, so set te minimum
* accordingly.
*/
chart.getStyler().setXAxisMin(90.0);
// Series
XYSeries series = chart.addSeries(chartProperties.getSeriesName(), xData, yData);
series.setLineColor(XChartSeriesColors.BLUE);
series.setMarkerColor(Color.LIGHT_GRAY);
series.setMarker(SeriesMarkers.NONE);
series.setLineStyle(SeriesLines.SOLID);
BitmapEncoder.saveBitmap(chart, baseName + "_90.png", BitmapEncoder.BitmapFormat.PNG);
}
示例3: plotAll
import org.knowm.xchart.BitmapEncoder; //导入方法依赖的package包/类
private void plotAll(List<Double> xData, List<Double> yData) throws IOException {
// Create Chart
XYChart chart = buildCommonChart();
/*
* This shows almost everything so set te minimum
* accordingly.
*/
chart.getStyler().setXAxisMin(5.0);
// Series
XYSeries series = chart.addSeries(chartProperties.getSeriesName(), xData, yData);
series.setLineColor(XChartSeriesColors.BLUE);
series.setMarkerColor(Color.LIGHT_GRAY);
series.setMarker(SeriesMarkers.NONE);
series.setLineStyle(SeriesLines.SOLID);
BitmapEncoder.saveBitmap(chart, baseName + "_all.png", BitmapEncoder.BitmapFormat.PNG);
}
示例4: chartGenerated
import org.knowm.xchart.BitmapEncoder; //导入方法依赖的package包/类
protected static void chartGenerated(CategoryChart chart, String writeLocation) throws IOException {
if (StringUtils.isNullOrEmpty(writeLocation)) {
new SwingWrapper<CategoryChart>(chart).displayChart();
System.in.read();
} else {
BitmapEncoder.saveBitmap(chart, writeLocation, BitmapFormat.PNG);
}
}
示例5: saveChart
import org.knowm.xchart.BitmapEncoder; //导入方法依赖的package包/类
public void saveChart(String fileName, BitmapFormat format) throws IOException {
for (String chart : this.charts.keySet()) {
BitmapEncoder.saveBitmap(this.charts.get(chart), fileName + "_" + chart, format);
}
}