private void configureRangeAxis(CategoryPlot plot, String valueLabelSuffix, Font font) { NumberAxis numberAxis = new NumberAxis(); numberAxis.setUpperMargin(0.3); numberAxis.setTickLabelFont(font); numberAxis.setTickLabelPaint(OUTLINE_COLOR); String suffix = ""; if (valueLabelSuffix != null && !"".equals(valueLabelSuffix)) { suffix = new StringBuilder().append("'").append(valueLabelSuffix).append("'").toString(); } numberAxis.setNumberFormatOverride(new DecimalFormat("0" + suffix)); numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); plot.setRangeAxis(numberAxis); } }
public ValueAxis createRangeAxis(DatasetOutput metadata) { NumberAxis axis = new NumberAxis(createRangeLabel(metadata)); axis.setTickLabelFont(LabelConstants.FONT_LABEL); axis.setLabelFont(LabelConstants.FONT_LABEL); axis.setTickLabelPaint(LabelConstants.COLOR); axis.setLabelPaint(LabelConstants.COLOR); return axis; }
public ValueAxis createRangeAxis(TimeseriesMetadataOutput metadata) { NumberAxis axis = new NumberAxis(createRangeLabel(metadata)); axis.setTickLabelFont(FONT_LABEL); axis.setLabelFont(FONT_LABEL); axis.setTickLabelPaint(COLOR); axis.setLabelPaint(COLOR); return axis; }
rangeAxis.setTickLabelPaint(Color.RED); plot.setRangeAxis(rangeAxis);
private void firstTimeSeries(final XYPlot plot) { final ValueAxis xaxis = plot.getDomainAxis(); xaxis.setAutoRange(true); // Domain axis would show data of 60 seconds for a time xaxis.setFixedAutoRange(60000.0); // 60 seconds xaxis.setVerticalTickLabels(true); final ValueAxis yaxis = plot.getRangeAxis(); yaxis.setRange(0.0, 300.0); final XYItemRenderer renderer = plot.getRenderer(); renderer.setSeriesPaint(0, Color.RED); final NumberAxis yAxis1 = (NumberAxis) plot.getRangeAxis(); yAxis1.setTickLabelPaint(Color.RED); }
axis1.setStandardTickUnits (NumberAxis.createIntegerTickUnits ()); axis1.setLabelPaint(Color.RED); axis1.setTickLabelPaint(Color.RED);