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

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

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

XYPlot.getDataRange介绍

[英]Returns the range for the specified axis.
[中]返回指定轴的范围。

代码示例

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

/**
 * Returns a range representing the extent of the data values in this plot
 * (obtained from the subplots) that will be rendered against the specified
 * axis.  NOTE: This method is intended for internal JFreeChart use, and
 * is public only so that code in the axis classes can call it.  Since
 * only the range axis is shared between subplots, the JFreeChart code
 * will only call this method for the range values (although this is not
 * checked/enforced).
 *
 * @param axis  the axis.
 *
 * @return The range.
 */
@Override
public Range getDataRange(ValueAxis axis) {
  Range result = null;
  if (this.subplots != null) {
    Iterator iterator = this.subplots.iterator();
    while (iterator.hasNext()) {
      XYPlot subplot = (XYPlot) iterator.next();
      result = Range.combine(result, subplot.getDataRange(axis));
    }
  }
  return result;
}

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

/**
 * Returns a range representing the extent of the data values in this plot
 * (obtained from the subplots) that will be rendered against the specified
 * axis.  NOTE: This method is intended for internal JFreeChart use, and
 * is public only so that code in the axis classes can call it.  Since
 * only the domain axis is shared between subplots, the JFreeChart code
 * will only call this method for the domain values (although this is not
 * checked/enforced).
 *
 * @param axis  the axis.
 *
 * @return The range (possibly {@code null}).
 */
@Override
public Range getDataRange(ValueAxis axis) {
  if (this.subplots == null) {
    return null;
  }
  Range result = null;
  for (XYPlot p : this.subplots) {
    result = Range.combine(result, p.getDataRange(axis));
  }
  return result;
}

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

/**
 * Returns a range representing the extent of the data values in this plot
 * (obtained from the subplots) that will be rendered against the specified
 * axis.  NOTE: This method is intended for internal JFreeChart use, and
 * is public only so that code in the axis classes can call it.  Since
 * only the domain axis is shared between subplots, the JFreeChart code
 * will only call this method for the domain values (although this is not
 * checked/enforced).
 *
 * @param axis  the axis.
 *
 * @return The range (possibly <code>null</code>).
 */
public Range getDataRange(ValueAxis axis) {
  Range result = null;
  if (this.subplots != null) {
    Iterator iterator = this.subplots.iterator();
    while (iterator.hasNext()) {
      XYPlot subplot = (XYPlot) iterator.next();
      result = Range.combine(result, subplot.getDataRange(axis));
    }
  }
  return result;
}

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

/**
 * Returns a range representing the extent of the data values in this plot
 * (obtained from the subplots) that will be rendered against the specified
 * axis.  NOTE: This method is intended for internal JFreeChart use, and
 * is public only so that code in the axis classes can call it.  Since
 * only the range axis is shared between subplots, the JFreeChart code
 * will only call this method for the range values (although this is not
 * checked/enforced).
 *
 * @param axis  the axis.
 *
 * @return The range.
 */
public Range getDataRange(ValueAxis axis) {
  Range result = null;
  if (this.subplots != null) {
    Iterator iterator = this.subplots.iterator();
    while (iterator.hasNext()) {
      XYPlot subplot = (XYPlot) iterator.next();
      result = Range.combine(result, subplot.getDataRange(axis));
    }
  }
  return result;
}

代码示例来源:origin: org.cytoscape/network-analyzer-impl

/**
 * Updates the axis-related properties of a chart.
 * 
 * @param aControl
 *            Chart control to be updated.
 * @param aAxes
 *            Axis-related visual settings to be applied.
 * @param aGrid
 *            Grid-related visual settings to be applied.
 */
public static void updateAxes(JFreeChart aControl, AxesSettings aAxes, GridSettings aGrid) {
  XYPlot plot = aControl.getXYPlot();
  Range domainDataRange = aAxes.getLogarithmicDomainAxis() ? new Range(logLowerBound(plot
      .getDataset(), true), plot.getDataRange(plot.getDomainAxis()).getUpperBound())
      : plot.getDataRange(plot.getDomainAxis());
  Range rangeDataRange = aAxes.getLogarithmicRangeAxis() ? new Range(logLowerBound(plot
      .getDataset(), false), plot.getDataRange(plot.getRangeAxis()).getUpperBound())
      : plot.getDataRange(plot.getRangeAxis());
  updateAxes(plot, aAxes, aGrid, domainDataRange, rangeDataRange);
}

代码示例来源:origin: org.cytoscape/network-analyzer-impl

XYPlot plot = chart.getXYPlot();
Range domainDataRange = aAxes.getLogarithmicDomainAxis() ? new Range(logLowerBound(plot
    .getDataset(), true), plot.getDataRange(plot.getDomainAxis()).getUpperBound())
    : plot.getDataRange(plot.getDomainAxis());
Range rangeDataRange = aAxes.getLogarithmicRangeAxis() ? new Range(logLowerBound(plot
    .getDataset(), false), plot.getDataRange(plot.getRangeAxis()).getUpperBound())
    : plot.getDataRange(plot.getRangeAxis());
updateGeneral(plot, aGeneral);
updateAxes(plot, aAxes, aGrid, domainDataRange, rangeDataRange);

相关文章

微信公众号

最新文章

更多

XYPlot类方法