gpt4 book ai didi

org.jfree.chart.renderer.xy.XYDotRenderer类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 23:50:40 27 4
gpt4 key购买 nike

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

XYDotRenderer介绍

[英]A renderer that draws a small dot at each data point for an XYPlot. The example shown here is generated by the ScatterPlotDemo4.java program included in the JFreeChart demo collection:
[中]在XYPlot的每个数据点上绘制一个小点的渲染器。此处显示的示例由ScatterPlotDemo4生成。JFreeChart演示集合中包含的java程序:

代码示例

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

/**
 * Sets the dot width and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param w  the new width (must be greater than zero).
 *
 * @throws IllegalArgumentException if <code>w</code> is less than one.
 *
 * @since 1.0.2
 * @see #getDotWidth()
 */
public void setDotWidth(int w) {
  if (w < 1) {
    throw new IllegalArgumentException("Requires w > 0.");
  }
  this.dotWidth = w;
  fireChangeEvent();
}

代码示例来源:origin: org.dkpro.tc/dkpro-tc-ml

@Override
public void write(OutputStream aStream) throws IOException
{
  JFreeChart chart = ChartFactory.createXYLineChart("Scatterplot", "Gold", "Prediction",
      aDataset, PlotOrientation.VERTICAL, false, false, false);
  XYDotRenderer renderer = new XYDotRenderer();
  renderer.setDotHeight(2);
  renderer.setDotWidth(2);
  double padding = (max - min) / 10;
  chart.getXYPlot().setRenderer(renderer);
  chart.getXYPlot().getRangeAxis().setRange(min - padding, max + padding);
  chart.getXYPlot().getDomainAxis().setRange(min - padding, max + padding);
  ChartUtil.writeChartAsPDF(aStream, chart, 400, 400);
}

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

XYPlot plot = getPlot();
if (plot == null) {
  return null;
if (getItemVisible(series, 0)) {
  String label = getLegendItemLabelGenerator().generateLabel(dataset,
      series);
  String description = label;
  String toolTipText = null;
  if (getLegendItemToolTipGenerator() != null) {
    toolTipText = getLegendItemToolTipGenerator().generateLabel(
        dataset, series);
  if (getLegendItemURLGenerator() != null) {
    urlText = getLegendItemURLGenerator().generateLabel(
        dataset, series);
  Paint fillPaint = lookupSeriesPaint(series);
  result = new LegendItem(label, description, toolTipText, urlText,
      getLegendShape(), fillPaint);
  result.setLabelFont(lookupLegendTextFont(series));
  Paint labelPaint = lookupLegendTextPaint(series);
  if (labelPaint != null) {
    result.setLabelPaint(labelPaint);

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

if (!getItemVisible(series, item)) {
  return;
      - adjy;
  g2.setPaint(getItemPaint(series, item));
  PlotOrientation orientation = plot.getOrientation();
  if (orientation == PlotOrientation.HORIZONTAL) {
  updateCrosshairValues(crosshairState, x, y, datasetIndex,
      transX, transY, orientation);

代码示例来源:origin: dkpro/dkpro-tc

@Override
public void write(OutputStream aStream) throws IOException
{
  JFreeChart chart = ChartFactory.createXYLineChart("Scatterplot", "Gold", "Prediction",
      aDataset, PlotOrientation.VERTICAL, false, false, false);
  XYDotRenderer renderer = new XYDotRenderer();
  renderer.setDotHeight(2);
  renderer.setDotWidth(2);
  double padding = (max - min) / 10;
  chart.getXYPlot().setRenderer(renderer);
  chart.getXYPlot().getRangeAxis().setRange(min - padding, max + padding);
  chart.getXYPlot().getDomainAxis().setRange(min - padding, max + padding);
  ChartUtil.writeChartAsPDF(aStream, chart, 400, 400);
}

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

XYPlot plot = getPlot();
if (plot == null) {
  return null;
if (getItemVisible(series, 0)) {
  String label = getLegendItemLabelGenerator().generateLabel(dataset,
      series);
  String description = label;
  String toolTipText = null;
  if (getLegendItemToolTipGenerator() != null) {
    toolTipText = getLegendItemToolTipGenerator().generateLabel(
        dataset, series);
  if (getLegendItemURLGenerator() != null) {
    urlText = getLegendItemURLGenerator().generateLabel(
        dataset, series);
  Paint fillPaint = lookupSeriesPaint(series);
  result = new LegendItem(label, description, toolTipText, urlText,
      getLegendShape(), fillPaint);
  result.setLabelFont(lookupLegendTextFont(series));
  Paint labelPaint = lookupLegendTextPaint(series);
  if (labelPaint != null) {
    result.setLabelPaint(labelPaint);

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

if (!getItemVisible(series, item)) {
  return;
      - adjy;
  g2.setPaint(getItemPaint(series, item));
  PlotOrientation orientation = plot.getOrientation();
  if (orientation == PlotOrientation.HORIZONTAL) {
  updateCrosshairValues(crosshairState, x, y, domainAxisIndex,
      rangeAxisIndex, transX, transY, orientation);

代码示例来源:origin: ca.umontreal.iro/ssj

XYDotRenderer shape = new XYDotRenderer();
final int dotSize = 3;
shape.setDotWidth(dotSize);
shape.setDotHeight(dotSize);
int nb = getSeriesCollection().getSeriesCollection().getSeriesCount();
for (int i = 0 ; i < nb ; i++)

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

/**
 * Sets the shape used as a line in each legend item and sends a
 * {@link RendererChangeEvent} to all registered listeners.
 *
 * @param shape  the shape (<code>null</code> not permitted).
 *
 * @see #getLegendShape()
 *
 * @since 1.0.7
 */
public void setLegendShape(Shape shape) {
  if (shape == null) {
    throw new IllegalArgumentException("Null 'shape' argument.");
  }
  this.legendShape = shape;
  fireChangeEvent();
}

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2-experimental

XYDotRenderer render = new XYDotRenderer();
render.setDotWidth(2);
render.setDotHeight(2);
plot.setRenderer(render);

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

/**
 * Sets the dot width and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param w  the new width (must be greater than zero).
 *
 * @throws IllegalArgumentException if {@code w} is less than one.
 *
 * @since 1.0.2
 * @see #getDotWidth()
 */
public void setDotWidth(int w) {
  if (w < 1) {
    throw new IllegalArgumentException("Requires w > 0.");
  }
  this.dotWidth = w;
  fireChangeEvent();
}

代码示例来源:origin: pentaho/pentaho-platform

break;
case DOT_CHART_TYPE:
 renderer = new XYDotRenderer();
 ( (XYDotRenderer) renderer ).setDotHeight( chartDefinition.getDotHeight() );
 ( (XYDotRenderer) renderer ).setDotWidth( chartDefinition.getDotWidth() );
 break;
default:

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

/**
 * Sets the dot height and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param h  the new height (must be greater than zero).
 *
 * @throws IllegalArgumentException if {@code h} is less than one.
 *
 * @since 1.0.2
 * @see #getDotHeight()
 */
public void setDotHeight(int h) {
  if (h < 1) {
    throw new IllegalArgumentException("Requires h > 0.");
  }
  this.dotHeight = h;
  fireChangeEvent();
}

代码示例来源:origin: pentaho/pentaho-platform

break;
case DOT_CHART_TYPE:
 renderer = new XYDotRenderer();
 ( (XYDotRenderer) renderer ).setDotHeight( chartDefinition.getDotHeight() );
 ( (XYDotRenderer) renderer ).setDotWidth( chartDefinition.getDotWidth() );
 break;
default:

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

/**
 * Sets the dot height and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param h  the new height (must be greater than zero).
 *
 * @throws IllegalArgumentException if <code>h</code> is less than one.
 *
 * @since 1.0.2
 * @see #getDotHeight()
 */
public void setDotHeight(int h) {
  if (h < 1) {
    throw new IllegalArgumentException("Requires h > 0.");
  }
  this.dotHeight = h;
  fireChangeEvent();
}

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

/**
 * Sets the shape used as a line in each legend item and sends a
 * {@link RendererChangeEvent} to all registered listeners.
 *
 * @param shape  the shape ({@code null} not permitted).
 *
 * @see #getLegendShape()
 *
 * @since 1.0.7
 */
public void setLegendShape(Shape shape) {
  Args.nullNotPermitted(shape, "shape");
  this.legendShape = shape;
  fireChangeEvent();
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com