org.jfree.chart.plot.XYPlot.setRangeAxisLocation()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(12.3k)|赞(0)|评价(0)|浏览(63)

本文整理了Java中org.jfree.chart.plot.XYPlot.setRangeAxisLocation()方法的一些代码示例,展示了XYPlot.setRangeAxisLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.setRangeAxisLocation()方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:setRangeAxisLocation

XYPlot.setRangeAxisLocation介绍

[英]Sets the location for a range axis and sends a PlotChangeEventto all registered listeners.
[中]设置范围轴的位置,并向所有注册的侦听器发送PlotChangeEvent。

代码示例

代码示例来源:origin: yahoo/egads

subplot1.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
plot.add(subplot1, 1);
errorDebug += aes.getIndexToError().get(i) + ": " + d + " ";

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * 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);
}

代码示例来源:origin: jfree/jfreechart

/**
 * 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);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * 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);
}

代码示例来源:origin: jfree/jfreechart

/**
 * 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);
}

代码示例来源:origin: jfree/jfreechart

/**
 * 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);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * 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);
}

代码示例来源:origin: yahoo/egads

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);

代码示例来源:origin: senbox-org/snap-desktop

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;
}

代码示例来源:origin: org.codehaus.mojo/chronos-report-maven-plugin

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 );
}

代码示例来源:origin: org.codehaus.mojo/chronos-report-maven-plugin

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;
}

代码示例来源:origin: inspectIT/inspectIT

/**
 * 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;
}

代码示例来源:origin: org.codehaus.mojo/chronos-report-maven-plugin

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;
}

代码示例来源:origin: com.atlassian.confluence.extra.chart/chart-plugin

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());
}

代码示例来源:origin: com.atlassian.jira/jira-api

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());
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

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);
  }
}

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

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);
  }
}

代码示例来源:origin: us.ihmc/IHMCAvatarInterfaces

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);
  }
}

代码示例来源:origin: org.codehaus.mojo/chronos-report-maven-plugin

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 );
}

代码示例来源:origin: inspectIT/inspectIT

/**
 * 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;
}

相关文章

微信公众号

最新文章

更多

XYPlot类方法