本文整理汇总了Java中org.knowm.xchart.SwingWrapper类的典型用法代码示例。如果您正苦于以下问题:Java SwingWrapper类的具体用法?Java SwingWrapper怎么用?Java SwingWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SwingWrapper类属于org.knowm.xchart包,在下文中一共展示了SwingWrapper类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: show
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public static void show(String chartTitle, NumericColumn xColumn, NumericColumn yColumn, ViewGroup group) {
XYChart chart = new XYChart(DEFAULT_WIDTH, DEFAULT_HEIGHT);
chart.setTitle(chartTitle);
chart.setXAxisTitle(xColumn.name());
chart.setYAxisTitle(yColumn.name());
chart.getStyler().setTheme(new TablesawTheme());
chart.getStyler().setMarkerSize(5);
chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);
for (TemporaryView view : group) {
double[] xData = view.numericColumn(xColumn.name()).toDoubleArray();
double[] yData = view.numericColumn(yColumn.name()).toDoubleArray();
chart.addSeries(view.name(), Arrays.copyOf(xData, xData.length), Arrays.copyOf(yData, yData.length));
}
new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:20,代码来源:XchartScatter.java
示例2: show
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public static void show(String chartTitle, NumericColumn xColumn, NumericColumn yColumn, ViewGroup group) {
XYChart chart = new XYChart(DEFAULT_WIDTH, DEFAULT_HEIGHT);
chart.setTitle(chartTitle);
chart.setXAxisTitle(xColumn.name());
chart.setYAxisTitle(yColumn.name());
chart.getStyler().setTheme(new TablesawTheme());
chart.getStyler().setMarkerSize(5);
chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);
for (TemporaryView view : group) {
double[] xData = view.numericColumn(xColumn.name()).toDoubleArray();
double[] yData = view.numericColumn(yColumn.name()).toDoubleArray();
chart.addSeries(view.name(), Arrays.copyOf(xData, xData.length), Arrays.copyOf(yData, yData.length));
}
new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:19,代码来源:XchartLine.java
示例3: main
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public static void main(String[] args) {
XYChart chart = new XYChartBuilder().width(800).height(600).build();
// Customize Chart
chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);
chart.getStyler().setChartTitleVisible(false);
chart.getStyler().setLegendPosition(Styler.LegendPosition.InsideSW);
chart.getStyler().setXAxisMax(5.0);
chart.getStyler().setXAxisMin(-5.0);
chart.getStyler().setYAxisMax(5.0);
chart.getStyler().setYAxisMin(-5.0);
chart.getStyler().setMarkerSize(2);
// Series
double[] xData = normal(0, 1, 1000);
double[] yData = normal(0, 1, 1000);
chart.addSeries("Gaussian Blob", xData, yData);
new SwingWrapper<>(chart).displayChart();
}
开发者ID:parrt,项目名称:AniML,代码行数:20,代码来源:TestXChart.java
示例4: main
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public static void main(String[] args) {
int row=0;
CSVReader fileReader = new CSVReader();
try {
fileReader.read(plotChanelArray);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
int numCharts = 4;
List<XYChart> charts = new ArrayList<XYChart>();
double[] array = new double[22000];
for (int i=0;i<21000;i++){
array[i]=plotChanelArray[i][0];
}
for (int i = 0; i < numCharts; i++) {
XYChart chart = new XYChartBuilder().xAxisTitle("X").yAxisTitle("Y").width(600).height(400).build();
//chart.getStyler().setYAxisMin((double) -10);
// chart.getStyler().setYAxisMax((double) 10);
//XYSeries series = chart.addSeries("" + i, null, getRandomWalk(200));
XYSeries series = chart.addSeries("" + i, null, array);
series.setMarker(SeriesMarkers.NONE);
charts.add(chart);
}
new SwingWrapper<XYChart>(charts).displayChartMatrix();
//new ZoomManager(charts);
final StackPane pane = new StackPane();
pane.getChildren().add((Node) charts);
final Scene scene = new Scene(pane, 500, 400);
}
开发者ID:gransort,项目名称:Java-oscilloscope-project,代码行数:40,代码来源:Example2.java
示例5: show
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public static void show(String chartTitle, double[] xData, NumericColumn yColumn, int width, int height) {
double[] yData = yColumn.toDoubleArray();
// Create Chart
XYChart chart = new XYChart(width, height);
chart.setTitle(chartTitle);
chart.setYAxisTitle(yColumn.name());
chart.getStyler().setTheme(new TablesawTheme());
chart.getStyler().setMarkerSize(2);
chart.getStyler().setDefaultSeriesRenderStyle(XYSeries.XYSeriesRenderStyle.Scatter);
XYSeries series = chart.addSeries("Ranked: " + yColumn.name(), xData, yData);
series.setMarker(SeriesMarkers.CIRCLE);
new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:16,代码来源:XchartQuantile.java
示例6: chartGenerated
import org.knowm.xchart.SwingWrapper; //导入依赖的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);
}
}
开发者ID:threadly,项目名称:threadly_benchmarks,代码行数:9,代码来源:DatabaseGraphPngExport.java
示例7: display
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
private static JFrame display(BubbleChart chart) {
return new SwingWrapper<>(chart).displayChart(WINDOW_TITLE);
}
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:4,代码来源:XchartBubble.java
示例8: main
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public static void main(String[] args) {
ExampleChart<CategoryChart> exampleChart = new BarChart06();
CategoryChart chart = exampleChart.getChart();
new SwingWrapper<CategoryChart>(chart).displayChart();
}
开发者ID:parrt,项目名称:AniML,代码行数:7,代码来源:BarChart06.java
示例9: showPlot
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public void showPlot() {
new SwingWrapper<>(getChart()).displayChart();
}
开发者ID:cinquin,项目名称:mutinack,代码行数:4,代码来源:Histogram.java
示例10: initChart
import org.knowm.xchart.SwingWrapper; //导入依赖的package包/类
public void initChart() {
this.sw = new SwingWrapper<XYChart>(new ArrayList<XYChart>(this.charts.values()));
this.sw.displayChartMatrix(this.name);
}
开发者ID:jMetal,项目名称:jMetal,代码行数:5,代码来源:ChartContainer.java
注:本文中的org.knowm.xchart.SwingWrapper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论