renderer.setSeriesShape(seriesIndex, ShapeUtilities.createDiamond(1.5F)); renderer.setSeriesVisibleInLegend(seriesIndex, false); seriesIndex++;
private XYPlot createPeriodCostPlot(TangoColorFactory tangoColorFactory, CheapTimeSolution solution) { XYSeries series = new XYSeries("Power price"); for (PeriodPowerPrice periodPowerPrice : solution.getPeriodPowerPriceList()) { series.add((double) periodPowerPrice.getPowerPriceMicros() / 1000000.0, periodPowerPrice.getPeriod()); } XYSeriesCollection seriesCollection = new XYSeriesCollection(); seriesCollection.addSeries(series); XYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES); renderer.setSeriesPaint(0, TangoColorFactory.ORANGE_1); renderer.setSeriesShape(0, ShapeUtilities.createDiamond(2.0F)); NumberAxis domainAxis = new NumberAxis("Power price"); return new XYPlot(seriesCollection, domainAxis, null, renderer); }
renderer.setSeriesShape(seriesIndex, ShapeUtilities.createDiamond(1.5F)); renderer.setSeriesVisibleInLegend(seriesIndex, false); seriesIndex++;
private XYPlot createPeriodCostPlot(TangoColorFactory tangoColorFactory, CheapTimeSolution solution) { XYSeries series = new XYSeries("Power price"); for (PeriodPowerPrice periodPowerPrice : solution.getPeriodPowerPriceList()) { series.add((double) periodPowerPrice.getPowerPriceMicros() / 1000000.0, periodPowerPrice.getPeriod()); } XYSeriesCollection seriesCollection = new XYSeriesCollection(); seriesCollection.addSeries(series); XYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES); renderer.setSeriesPaint(0, TangoColorFactory.ORANGE_1); renderer.setSeriesShape(0, ShapeUtilities.createDiamond(2.0F)); NumberAxis domainAxis = new NumberAxis("Power price"); return new XYPlot(seriesCollection, domainAxis, null, renderer); }