List of usage examples for org.jfree.chart.renderer.xy XYItemRenderer setSeriesOutlineStroke
public void setSeriesOutlineStroke(int series, Stroke stroke);
From source file:playground.dgrether.linkanalysis.DgCountPerIterationGraph.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("Iteration"); xAxis.setRange(this.controllerConfig.getFirstIteration(), this.controllerConfig.getLastIteration() + 2); ValueAxis yAxis = this.axisBuilder.createValueAxis("Trips"); // yAxis.setRange(-0.05, 0.3); // xAxis.setVisible(false); // xAxis.setFixedAutoRange(1.0); plot.setDomainAxis(xAxis);//from ww w .ja v a 2s . c om plot.setRangeAxis(yAxis); plot.setDataset(0, this.dataset); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); for (int i = 0; i < this.dataset.getSeriesCount(); i++) { renderer2.setSeriesItemLabelsVisible(i, true); renderer2.setSeriesOutlineStroke(i, new BasicStroke(3.0f)); renderer2.setSeriesStroke(i, new BasicStroke(2.0f)); renderer2.setSeriesPaint(i, colorScheme.getColor(i + 1, "a")); } // renderer2.setSeriesItemLabelGenerator(0, this.labelGenerator); // renderer2.setSeriesStroke(1, new BasicStroke(2.0f)); // renderer2.setSeriesOutlineStroke(1, new BasicStroke(3.0f)); // renderer2.setSeriesPaint(1, colorScheme.getColor(2, "a")); plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); // chart.removeLegend(); return chart; }
From source file:playground.dgrether.analysis.charts.DgAvgDeltaUtilsModeGroupChart.java
@Override public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("Income [Chf / Year]"); ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Utils [Utils]"); plot.setDomainAxis(xAxis);//from w w w .j a va 2 s . com plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); plot.setDataset(0, this.dataset); for (int i = 0; i <= 3; i++) { renderer2.setSeriesStroke(i, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(i, new BasicStroke(3.0f)); renderer2.setSeriesPaint(i, colorScheme.getColor(i + 1, "a")); } plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); return chart; }
From source file:playground.dgrether.analysis.charts.DgMixedModeSwitcherOnlyDeltaScoreIncomeModeChoiceChart.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("Income [Chf / Year]"); ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Utils [Utils]"); plot.setDomainAxis(xAxis);/*w w w . ja va2 s . c om*/ plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer1 = new XYLineAndShapeRenderer(false, true); renderer1.setSeriesPaint(0, colorScheme.COLOR3B); renderer1.setSeriesPaint(1, colorScheme.COLOR4B); plot.setDataset(0, this.inomeModeChoiceDs); plot.setRenderer(0, renderer1); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); plot.setDataset(1, this.avgDeltaScoreIncomeDs); for (int i = 2; i <= 3; i++) { renderer2.setSeriesStroke(i - 2, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(i - 2, new BasicStroke(3.0f)); renderer2.setSeriesPaint(i - 2, colorScheme.getColor(i + 1, "a")); } plot.setRenderer(1, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); return chart; }
From source file:playground.dgrether.analysis.charts.DgMixedDeltaUtilsModeGroupChart.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("% of Population Sorted by Income"); ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Utils [Utils]"); plot.setDomainAxis(xAxis);/*w ww . j av a2 s . c om*/ plot.setRangeAxis(yAxis); //RANGE xAxis.setRange(0.0, 102.0); yAxis.setRange(-0.31, 0.61); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer1 = new XYLineAndShapeRenderer(false, true); renderer1.setSeriesPaint(0, colorScheme.COLOR1B); renderer1.setSeriesPaint(1, colorScheme.COLOR2B); renderer1.setSeriesPaint(2, colorScheme.COLOR3B); renderer1.setSeriesPaint(3, colorScheme.COLOR4B); plot.setDataset(0, this.inomeModeChoiceDs); plot.setRenderer(0, renderer1); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); plot.setDataset(1, this.avgDeltaScoreIncomeDs); for (int i = 0; i <= 3; i++) { renderer2.setSeriesStroke(i, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(i, new BasicStroke(3.0f)); renderer2.setSeriesPaint(i, colorScheme.getColor(i + 1, "a")); } plot.setRenderer(1, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); return chart; }
From source file:playground.dgrether.analysis.charts.DgAvgDeltaUtilsModeQuantilesChart.java
@Override public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("% of Population Sorted by Income"); xAxis.setRange(0.0, 102.0);//from w w w.ja v a 2 s. c o m ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Utils [Utils]"); yAxis.setRange(-0.05, 0.3); plot.setDomainAxis(xAxis); plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); plot.setDataset(0, this.dataset); for (int i = 0; i <= 3; i++) { renderer2.setSeriesStroke(i, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(i, new BasicStroke(3.0f)); renderer2.setSeriesPaint(i, colorScheme.getColor(i + 1, "a")); } plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); return chart; }
From source file:playground.dgrether.analysis.charts.DgAvgDeltaUtilsQuantilesChart.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("% of Population Sorted by Income"); xAxis.setRange(0.0, 102.0);/*from ww w. j a v a 2 s. c om*/ ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Utils [Utils]"); yAxis.setRange(-0.05, 0.3); // xAxis.setVisible(false); // xAxis.setFixedAutoRange(1.0); plot.setDomainAxis(xAxis); plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); renderer2.setSeriesItemLabelsVisible(0, true); // renderer2.setSeriesItemLabelGenerator(0, this.labelGenerator); plot.setDataset(0, this.dataset); renderer2.setSeriesStroke(0, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(0, new BasicStroke(3.0f)); renderer2.setSeriesPaint(0, colorScheme.getColor(1, "a")); plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); chart.removeLegend(); return chart; }
From source file:playground.dgrether.analysis.charts.DgAvgDeltaMoneyGroupChart.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("Income [Chf / Year]"); ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Money [Chf]"); plot.setDomainAxis(xAxis);/*from www. j av a 2 s . c om*/ plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); renderer2.setSeriesItemLabelsVisible(0, true); renderer2.setSeriesItemLabelGenerator(0, this.labelGenerator); plot.setDataset(0, this.dataset); renderer2.setSeriesStroke(0, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(0, new BasicStroke(3.0f)); renderer2.setSeriesPaint(0, colorScheme.getColor(1, "a")); plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); return chart; }
From source file:playground.dgrether.analysis.charts.DgTravelTimeCalculatorChart.java
@Override public JFreeChart createChart() { XYSeriesCollection dataset = this.createDataSet(); XYPlot plot = new XYPlot(); DgAxisBuilder axisBuilder = new DgDefaultAxisBuilder(); ValueAxis xAxis = axisBuilder.createValueAxis("Simulation Time"); // xAxis.setRange(this.controllerConfig.getFirstIteration(), this.controllerConfig.getLastIteration() + 2); ValueAxis yAxis = axisBuilder.createValueAxis("Travel Time"); // yAxis.setRange(-0.05, 0.3); // xAxis.setVisible(false); // xAxis.setFixedAutoRange(1.0); plot.setDomainAxis(xAxis);/* w w w . j a va2 s. c o m*/ plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, false); renderer2.setSeriesItemLabelsVisible(0, true); // renderer2.setSeriesItemLabelGenerator(0, this.labelGenerator); plot.setDataset(0, dataset); renderer2.setSeriesStroke(0, new BasicStroke(1.0f)); renderer2.setSeriesOutlineStroke(0, new BasicStroke(1.0f)); renderer2.setSeriesPaint(0, colorScheme.getColor(1, "a")); renderer2.setSeriesStroke(1, new BasicStroke(1.0f)); renderer2.setSeriesOutlineStroke(1, new BasicStroke(1.0f)); renderer2.setSeriesPaint(1, colorScheme.getColor(2, "a")); renderer2.setSeriesStroke(2, new BasicStroke(1.0f)); renderer2.setSeriesOutlineStroke(2, new BasicStroke(1.0f)); renderer2.setSeriesPaint(2, colorScheme.getColor(3, "a")); renderer2.setSeriesStroke(3, new BasicStroke(1.0f)); renderer2.setSeriesOutlineStroke(3, new BasicStroke(1.0f)); renderer2.setSeriesPaint(3, colorScheme.getColor(4, "a")); plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); // chart.removeLegend(); return chart; }
From source file:playground.dgrether.signalsystems.analysis.DgGreenSplitPerIterationGraph.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("Iteration"); xAxis.setRange(this.controllerConfig.getFirstIteration(), this.controllerConfig.getLastIteration() + 2); ValueAxis yAxis = this.axisBuilder.createValueAxis("GreenTime"); // yAxis.setRange(-0.05, 0.3); // xAxis.setVisible(false); // xAxis.setFixedAutoRange(1.0); plot.setDomainAxis(xAxis);//from www . jav a2s . co m plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); renderer2.setSeriesItemLabelsVisible(0, true); // renderer2.setSeriesItemLabelGenerator(0, this.labelGenerator); plot.setDataset(0, this.getDataset()); renderer2.setSeriesStroke(0, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(0, new BasicStroke(3.0f)); renderer2.setSeriesPaint(0, colorScheme.getColor(1, "a")); renderer2.setSeriesStroke(1, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(1, new BasicStroke(3.0f)); renderer2.setSeriesPaint(1, colorScheme.getColor(2, "a")); renderer2.setSeriesStroke(2, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(2, new BasicStroke(3.0f)); renderer2.setSeriesPaint(2, colorScheme.getColor(3, "a")); renderer2.setSeriesStroke(3, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(3, new BasicStroke(3.0f)); renderer2.setSeriesPaint(3, colorScheme.getColor(4, "a")); plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); // chart.removeLegend(); return chart; }
From source file:playground.dgrether.analysis.charts.DgAvgDeltaUtilsGroupChart.java
public JFreeChart createChart() { XYPlot plot = new XYPlot(); ValueAxis xAxis = this.axisBuilder.createValueAxis("Income [Chf / Year]"); ValueAxis yAxis = this.axisBuilder.createValueAxis("Delta Utils [Utils]"); plot.setDomainAxis(xAxis);//from w w w . j a va 2 s .c om plot.setRangeAxis(yAxis); DgColorScheme colorScheme = new DgColorScheme(); XYItemRenderer renderer2; renderer2 = new XYLineAndShapeRenderer(true, true); renderer2.setSeriesItemLabelsVisible(0, true); renderer2.setSeriesItemLabelGenerator(0, this.labelGenerator); plot.setDataset(0, this.dataset); renderer2.setSeriesStroke(0, new BasicStroke(2.0f)); renderer2.setSeriesOutlineStroke(0, new BasicStroke(3.0f)); renderer2.setSeriesPaint(0, colorScheme.getColor(1, "a")); plot.setRenderer(0, renderer2); JFreeChart chart = new JFreeChart("", plot); chart.setBackgroundPaint(ChartColor.WHITE); chart.getLegend().setItemFont(this.axisBuilder.getAxisFont()); chart.setTextAntiAlias(true); return chart; }