subplot1.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT); plot.add(subplot1, 1); errorDebug += aes.getIndexToError().get(i) + ": " + d + " ";
/** * Sets the location for a range axis and sends a {@link PlotChangeEvent} * to all registered listeners. * * @param index the axis index. * @param location the location (<code>null</code> permitted). * * @see #getRangeAxisLocation(int) */ public void setRangeAxisLocation(int index, AxisLocation location) { // delegate... setRangeAxisLocation(index, location, true); }
/** * Sets the location of the primary range axis and sends a * {@link PlotChangeEvent} to all registered listeners. * * @param location the location ({@code null} not permitted). * * @see #getRangeAxisLocation() */ public void setRangeAxisLocation(AxisLocation location) { // delegate... setRangeAxisLocation(0, location, true); }
/** * Sets the location of the primary range axis and sends a * {@link PlotChangeEvent} to all registered listeners. * * @param location the location (<code>null</code> not permitted). * * @see #getRangeAxisLocation() */ public void setRangeAxisLocation(AxisLocation location) { // delegate... setRangeAxisLocation(0, location, true); }
/** * Sets the location of the primary range axis and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param location the location ({@code null} not permitted). * @param notify notify listeners? * * @see #getRangeAxisLocation() */ public void setRangeAxisLocation(AxisLocation location, boolean notify) { // delegate... setRangeAxisLocation(0, location, notify); }
/** * Sets the location for a range axis and sends a {@link PlotChangeEvent} * to all registered listeners. * * @param index the axis index. * @param location the location ({@code null} permitted). * * @see #getRangeAxisLocation(int) */ public void setRangeAxisLocation(int index, AxisLocation location) { // delegate... setRangeAxisLocation(index, location, true); }
/** * Sets the location of the primary range axis and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param location the location (<code>null</code> not permitted). * @param notify notify listeners? * * @see #getRangeAxisLocation() */ public void setRangeAxisLocation(AxisLocation location, boolean notify) { // delegate... setRangeAxisLocation(0, location, notify); }
final NumberAxis rangeAxis1 = new NumberAxis("Original Value"); XYPlot subplot1 = new XYPlot(data1, null, rangeAxis1, renderer1); subplot1.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT); rangeAxis2.setAutoRangeIncludesZero(false); final XYPlot subplot2 = new XYPlot(data2, null, rangeAxis2, renderer2); subplot2.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);
private ValueAxis configureRangeIndex(int index, int dataType) { ValueAxis axis = createAxis(dataType); axis.setAutoRange(true); Font axisFont = axis.getLabelFont().deriveFont(Font.BOLD); axis.setLabelFont(axisFont); axis.setLabel(String.format("Y%d Samples", index + 1)); xyPlot.setRangeAxis(index, axis); xyPlot.setRangeAxisLocation(index, index == 0 ? AxisLocation.BOTTOM_OR_LEFT : AxisLocation.BOTTOM_OR_RIGHT); return axis; }
public void createThroughputChart( HistoricSamples samples, String dataId ) throws IOException { XYPlot xyplot = newPlot( samples.getThroughput( dataId ), "chronos.label.throughput.requests", true ); xyplot.setRangeAxisLocation( AxisLocation.BOTTOM_OR_LEFT ); xyplot.getRenderer().setSeriesPaint( 0, Color.GREEN ); String timeLabel = bundle.getString( "chronos.label.throughput.historytime" ); DateAxis timeAxis = ChartUtil.createTimeAxis( timeLabel, new SimpleDateFormat() ); xyplot.setDomainAxis( timeAxis ); JFreeChart chart = new JFreeChart( bundle.getString( "chronos.label.throughput" ), xyplot ); renderer.renderChart( "history-throughput-" + dataId, chart ); }
private XYPlot createThreadCountPlot( ResourceBundle bundle ) { TimeSeries threadcountSeries = createThreadCount(); String label = bundle.getString( "chronos.label.threadcount.y" ); XYPlot threadCountPlot = ChartUtil.newPlot( label, false, asCollection( threadcountSeries ) ); threadCountPlot.setRangeAxisLocation( AxisLocation.TOP_OR_LEFT ); threadCountPlot.getRenderer().setSeriesPaint( 0, Color.GRAY ); return threadCountPlot; }
/** * Initializes the upper plot. * * @return An instance of {@link XYPlot}. */ private XYPlot initializePlot() { jmxChart = new YIntervalSeriesImproved("jmx value"); YIntervalSeriesCollection yintervalseriescollection = new YIntervalSeriesCollection(); yintervalseriescollection.addSeries(jmxChart); DeviationRenderer renderer = new DeviationRenderer(true, false); renderer.setBaseShapesVisible(true); renderer.setSeriesStroke(0, new BasicStroke(3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); renderer.setSeriesFillPaint(0, new Color(255, 200, 200)); renderer.setSeriesOutlineStroke(0, new BasicStroke(2.0f)); renderer.setSeriesShape(0, new Ellipse2D.Double(-2.5, -2.5, 5.0, 5.0)); renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, DateFormat.getDateTimeInstance(), NumberFormat.getNumberInstance())); NumberAxis rangeAxis = plotDataSolver.getAxis(); subplot = new XYPlot(yintervalseriescollection, null, rangeAxis, renderer); subplot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0)); subplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT); subplot.setRangeCrosshairVisible(true); return subplot; }
private XYPlot createThroughputPlot( ResourceBundle bundle, ReportConfig config ) { TimeSeries series = samples.createMovingThroughput( bundle.getString( "chronos.label.throughput" ) ); TimeSeries averageseries = createMovingAverage( series, bundle, config ); TimeSeriesCollection seriesCollection = asCollection( series, averageseries ); String verticalLabel = bundle.getString( "chronos.label.throughput.requests" ); XYPlot throughputPlot = ChartUtil.newPlot( verticalLabel, true, seriesCollection ); throughputPlot.setRangeAxisLocation( AxisLocation.BOTTOM_OR_LEFT ); throughputPlot.getRenderer().setSeriesPaint( 0, Color.GREEN ); throughputPlot.getRenderer().setSeriesPaint( 1, Color.BLUE ); throughputPlot.setSeriesRenderingOrder( SeriesRenderingOrder.FORWARD ); double maxAvgThroughput = samples.getMaxAverageThroughput( config.getAverageduration() ); String labelAverage = bundle.getString( "chronos.label.maxaveragethroughput" ); ChartUtil.addRangeMarker( throughputPlot, labelAverage, maxAvgThroughput ); return throughputPlot; }
public static void setupPlot(XYPlot plot) { plot.setBackgroundPaint(ChartDefaults.transparent); plot.setOutlinePaint(ChartDefaults.transparent); plot.setRangeGridlinePaint(ChartDefaults.gridLineColor); plot.setRangeGridlineStroke(new BasicStroke(0.5f)); plot.setRangeGridlinesVisible(true); plot.setRangeAxisLocation(ChartDefaults.rangeAxisLocation); plot.setDomainGridlinesVisible(true); ChartUtil.setupRangeAxis(plot.getRangeAxis()); ChartUtil.setupDomainAxis(plot.getDomainAxis()); }
public static void setupPlot(XYPlot plot) { plot.setBackgroundPaint(ChartDefaults.transparent); plot.setOutlinePaint(ChartDefaults.transparent); plot.setRangeGridlinePaint(ChartDefaults.gridLineColor); plot.setRangeGridlineStroke(new BasicStroke(0.5f)); plot.setRangeGridlinesVisible(true); plot.setRangeAxisLocation(ChartDefaults.rangeAxisLocation); plot.setDomainGridlinesVisible(true); ChartUtil.setupRangeAxis(plot.getRangeAxis()); ChartUtil.setupDomainAxis(plot.getDomainAxis()); }
private JFreeChart createChart(String title, XYDataset magDataset, String freqUnits, String magnitudeUnits) { XYItemRenderer renderer1 = new StandardXYItemRenderer(); NumberAxis rangeAxis1 = new NumberAxis("Magnitude " + magnitudeUnits); XYPlot subplot1 = new XYPlot(magDataset, new LogarithmicAxis("Frequency " + freqUnits), rangeAxis1, renderer1); subplot1.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT); renderer1.setSeriesVisibleInLegend(0, false); return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, subplot1, true); } }
private JFreeChart createChart(String title, XYDataset magDataset, String freqUnits, String magnitudeUnits) { XYItemRenderer renderer1 = new StandardXYItemRenderer(); NumberAxis rangeAxis1 = new NumberAxis("Magnitude " + magnitudeUnits); XYPlot subplot1 = new XYPlot(magDataset, new LogarithmicAxis("Frequency " + freqUnits), rangeAxis1, renderer1); subplot1.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT); renderer1.setSeriesVisibleInLegend(0, false); return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, subplot1, true); } }
private JFreeChart createChart(String title, XYDataset magDataset, String freqUnits, String magnitudeUnits) { XYItemRenderer renderer1 = new StandardXYItemRenderer(); NumberAxis rangeAxis1 = new NumberAxis("Magnitude " + magnitudeUnits); XYPlot subplot1 = new XYPlot(magDataset, new LogarithmicAxis("Frequency " + freqUnits), rangeAxis1, renderer1); subplot1.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT); renderer1.setSeriesVisibleInLegend(0, false); return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, subplot1, true); } }
public void createGcChart( HistoricSamples samples, String dataId ) throws IOException { XYPlot xyplot1 = newPlot( samples.getGcRatio( dataId ), "chronos.label.gc.ratio", true ); xyplot1.setRangeAxisLocation( AxisLocation.BOTTOM_OR_LEFT ); xyplot1.getRenderer().setSeriesPaint( 0, Color.GREEN ); xyplot1.getRangeAxis().setStandardTickUnits( NumberAxis.createStandardTickUnits() ); XYPlot xyplot2 = newPlot( samples.getKbCollectedPrSecond( dataId ), "chronos.label.gc.kbpersec", true ); xyplot2.setRangeAxisLocation( AxisLocation.TOP_OR_LEFT ); xyplot2.getRenderer().setSeriesPaint( 0, Color.GRAY ); xyplot2.getRangeAxis().setStandardTickUnits( NumberAxis.createStandardTickUnits() ); String timeLabel = bundle.getString( "chronos.label.gc.historytime" ); DateAxis timeAxis = ChartUtil.createTimeAxis( timeLabel, new SimpleDateFormat() ); XYPlot combinedPlot = ChartUtil.createCombinedPlot( timeAxis, xyplot1, xyplot2 ); // xyplot1.setDomainAxis( timeAxis ); // XYPlot combinedPlot = xyplot1; JFreeChart chart = new JFreeChart( bundle.getString( "chronos.label.gc" ), combinedPlot ); renderer.renderChart( "history-gc-" + dataId, chart ); }
/** * Initializes the upper plot. * * @return An instance of {@link XYPlot}. */ private XYPlot initializeUpperPlot() { loadedClasses = new YIntervalSeriesImproved("loaded classes"); totalLoadedClasses = new YIntervalSeriesImproved("total loaded classes"); YIntervalSeriesCollection yintervalseriescollection = new YIntervalSeriesCollection(); yintervalseriescollection.addSeries(loadedClasses); yintervalseriescollection.addSeries(totalLoadedClasses); DeviationRenderer renderer = new DeviationRenderer(true, false); renderer.setBaseShapesVisible(true); renderer.setSeriesStroke(0, new BasicStroke(3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); renderer.setSeriesFillPaint(0, new Color(255, 200, 200)); renderer.setSeriesOutlineStroke(0, new BasicStroke(2.0f)); renderer.setSeriesShape(0, new Ellipse2D.Double(-2.5, -2.5, 5.0, 5.0)); renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, DateFormat.getDateTimeInstance(), NumberFormat.getNumberInstance())); final NumberAxis rangeAxis = new NumberAxis("Classes"); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); rangeAxis.setAutoRangeMinimumSize(2000.0d); rangeAxis.setRangeType(RangeType.POSITIVE); rangeAxis.setAutoRangeIncludesZero(true); final XYPlot subplot = new XYPlot(yintervalseriescollection, null, rangeAxis, renderer); subplot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0)); subplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT); subplot.setRangeCrosshairVisible(true); return subplot; }