当前位置: 首页>>代码示例>>Java>>正文


Java StandardXYBarPainter类代码示例

本文整理汇总了Java中org.jfree.chart.renderer.xy.StandardXYBarPainter的典型用法代码示例。如果您正苦于以下问题:Java StandardXYBarPainter类的具体用法?Java StandardXYBarPainter怎么用?Java StandardXYBarPainter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StandardXYBarPainter类属于org.jfree.chart.renderer.xy包,在下文中一共展示了StandardXYBarPainter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createHistogramChart

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
/**
 * Creates the histogram chart.
 *
 * @param exampleSet
 * @return
 */
private JFreeChart createHistogramChart(final ExampleSet exampleSet) {
	JFreeChart chart = ChartFactory.createHistogram(null, null, null, createHistogramDataset(exampleSet),
			PlotOrientation.VERTICAL, false, false, false);
	AbstractAttributeStatisticsModel.setDefaultChartFonts(chart);
	chart.setBackgroundPaint(null);
	chart.setBackgroundImageAlpha(0.0f);

	XYPlot plot = (XYPlot) chart.getPlot();
	plot.setRangeGridlinesVisible(false);
	plot.setDomainGridlinesVisible(false);
	plot.setOutlineVisible(false);
	plot.setRangeZeroBaselineVisible(false);
	plot.setDomainZeroBaselineVisible(false);
	plot.getDomainAxis().setTickLabelsVisible(false);
	plot.setBackgroundPaint(COLOR_INVISIBLE);
	plot.setBackgroundImageAlpha(0.0f);

	XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();
	renderer.setSeriesPaint(0, AttributeGuiTools.getColorForValueType(Ontology.DATE_TIME));
	renderer.setBarPainter(new StandardXYBarPainter());
	renderer.setDrawBarOutline(true);
	renderer.setShadowVisible(false);

	return chart;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:32,代码来源:DateTimeAttributeStatisticsModel.java

示例2: createHistogramChart

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
/**
 * Creates the histogram chart.
 *
 * @param exampleSet
 * @return
 */
private JFreeChart createHistogramChart(ExampleSet exampleSet) {
	JFreeChart chart = ChartFactory.createHistogram(null, null, null, createHistogramDataset(exampleSet),
			PlotOrientation.VERTICAL, false, false, false);
	AbstractAttributeStatisticsModel.setDefaultChartFonts(chart);
	chart.setBackgroundPaint(null);
	chart.setBackgroundImageAlpha(0.0f);

	XYPlot plot = (XYPlot) chart.getPlot();
	plot.setRangeGridlinesVisible(false);
	plot.setDomainGridlinesVisible(false);
	plot.setOutlineVisible(false);
	plot.setRangeZeroBaselineVisible(false);
	plot.setDomainZeroBaselineVisible(false);
	plot.setBackgroundPaint(COLOR_INVISIBLE);
	plot.setBackgroundImageAlpha(0.0f);

	XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();
	renderer.setSeriesPaint(0, AttributeGuiTools.getColorForValueType(Ontology.NUMERICAL));
	renderer.setBarPainter(new StandardXYBarPainter());
	renderer.setDrawBarOutline(true);
	renderer.setShadowVisible(false);

	return chart;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:31,代码来源:NumericalAttributeStatisticsModel.java

示例3: setChartTheme

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
/**
 * Sets the current chart theme.  This will be applied to all new charts
 * created via methods in this class.
 *
 * @param theme  the theme (<code>null</code> not permitted).
 *
 * @see #getChartTheme()
 * @see ChartUtilities#applyCurrentTheme(JFreeChart)
 *
 * @since 1.0.11
 */
public static void setChartTheme(ChartTheme theme) {
    ParamChecks.nullNotPermitted(theme, "theme");
    currentTheme = theme;

    // here we do a check to see if the user is installing the "Legacy"
    // theme, and reset the bar painters in that case...
    if (theme instanceof StandardChartTheme) {
        StandardChartTheme sct = (StandardChartTheme) theme;
        if (sct.getName().equals("Legacy")) {
            BarRenderer.setDefaultBarPainter(new StandardBarPainter());
            XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
        }
        else {
            BarRenderer.setDefaultBarPainter(new GradientBarPainter());
            XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
        }
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:30,代码来源:ChartFactory.java

示例4: setChartTheme

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
/**
 * Sets the current chart theme.  This will be applied to all new charts
 * created via methods in this class.
 *
 * @param theme  the theme ({@code null} not permitted).
 *
 * @see #getChartTheme()
 * @see ChartUtils#applyCurrentTheme(JFreeChart)
 *
 * @since 1.0.11
 */
public static void setChartTheme(ChartTheme theme) {
    Args.nullNotPermitted(theme, "theme");
    currentTheme = theme;

    // here we do a check to see if the user is installing the "Legacy"
    // theme, and reset the bar painters in that case...
    if (theme instanceof StandardChartTheme) {
        StandardChartTheme sct = (StandardChartTheme) theme;
        if (sct.getName().equals("Legacy")) {
            BarRenderer.setDefaultBarPainter(new StandardBarPainter());
            XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
        }
        else {
            BarRenderer.setDefaultBarPainter(new GradientBarPainter());
            XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
        }
    }
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:30,代码来源:ChartFactory.java

示例5: copyNumberPDF

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
@NotNull
static JFreeChart copyNumberPDF(@NotNull final List<PurpleCopyNumber> copyNumbers) {
    final XYDataset dataset = ploidyPDF(copyNumbers, PurpleCopyNumber::averageTumorCopyNumber, PurpleCopyNumber::bafCount);
    JFreeChart chart =
            ChartFactory.createScatterPlot("Copy Number PDF", "Ploidy", "BAF Count", dataset, PlotOrientation.VERTICAL, false, false,
                    false);

    XYBarRenderer renderer = new XYBarRenderer(0.9);
    renderer.setShadowVisible(false);
    renderer.setBarPainter(new StandardXYBarPainter());
    renderer.setSeriesPaint(0, Color.BLUE);

    XYPlot xyPlot = (XYPlot) chart.getPlot();
    xyPlot.getDomainAxis().setRange(0, 10);
    xyPlot.setRenderer(renderer);
    return chart;
}
 
开发者ID:hartwigmedical,项目名称:hmftools,代码行数:18,代码来源:CopyNumberCharts.java

示例6: minorAllelePDF

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
@NotNull
static JFreeChart minorAllelePDF(@NotNull final List<PurpleCopyNumber> variants) {
    final CategoryTableXYDataset dataset = minorAllele(variants);
    final JFreeChart chart =
            ChartFactory.createXYBarChart("Minor Allele Ploidy PDF", "Ploidy", false, "BAF Count", dataset, PlotOrientation.VERTICAL,
                    true, false, false);

    StackedXYBarRenderer renderer = new StackedXYBarRenderer();
    renderer.setBarPainter(new StandardXYBarPainter());
    renderer.setShadowVisible(false);

    XYPlot xyPlot = (XYPlot) chart.getPlot();
    xyPlot.setRenderer(renderer);
    xyPlot.getDomainAxis().setRange(-1.1, 5.1);

    for (int i = 0; i < dataset.getSeriesCount(); i++) {
        renderer.setSeriesPaint(i, copyNumberColor(String.valueOf(dataset.getSeriesKey(i))));
    }
    return chart;
}
 
开发者ID:hartwigmedical,项目名称:hmftools,代码行数:21,代码来源:CopyNumberCharts.java

示例7: somaticPloidyPDF

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
@NotNull
static JFreeChart somaticPloidyPDF(@NotNull final List<PurityAdjustedSomaticVariant> variants) {
    final CategoryTableXYDataset dataset = variants(variants);
    final JFreeChart chart =
            ChartFactory.createXYBarChart("Somatic Variant Ploidy PDF", "Ploidy", false, "Count", dataset, PlotOrientation.VERTICAL,
                    true, false, false);

    StackedXYBarRenderer renderer = new StackedXYBarRenderer();
    renderer.setBarPainter(new StandardXYBarPainter());
    renderer.setShadowVisible(false);
    XYPlot xyPlot = (XYPlot) chart.getPlot();
    xyPlot.setRenderer(renderer);

    for (int i = 0; i < dataset.getSeriesCount(); i++) {
        renderer.setSeriesPaint(i, copyNumberColor(String.valueOf(dataset.getSeriesKey(i))));
    }
    return chart;
}
 
开发者ID:hartwigmedical,项目名称:hmftools,代码行数:19,代码来源:CopyNumberCharts.java

示例8: updateHistograms

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
private void updateHistograms() {
	dataSet = new HistogramDataset();
	plotRenderer = new ColoredXYBarRenderer();
	plotRenderer.setShadowVisible(false);
	plotRenderer.setBarPainter(new StandardXYBarPainter());
	plot = new XYPlot(dataSet, domainAxis, rangeAxis, plotRenderer);
	for (HistogrammVisualization vis : activeHistograms) {
		vis.addDataSeries(dataSet);
		vis.addMarkers(plot);
	}
	plot.configureDomainAxes();
	plot.configureRangeAxes();
	chart = new JFreeChart(plot);
	chartPanel.setChart(chart);
	chartPanel.restoreAutoBounds();
}
 
开发者ID:sechel,项目名称:jtem-halfedgetools,代码行数:17,代码来源:HistogramVisualizer.java

示例9: PeakRenderer

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
public PeakRenderer(Color color, boolean isTransparent) {

	this.isTransparent = isTransparent;

	// Set painting color
	setDefaultPaint(color);

	// Shadow makes fake peaks
	setShadowVisible(false);

	// Set the tooltip generator
	SpectraToolTipGenerator tooltipGenerator = new SpectraToolTipGenerator();
	setDefaultToolTipGenerator(tooltipGenerator);

	// We want to paint the peaks using simple color without any gradient
	// effects
	setBarPainter(new StandardXYBarPainter());
    }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:19,代码来源:PeakRenderer.java

示例10: setChartTheme

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
/**
 * Sets the current chart theme.  This will be applied to all new charts
 * created via methods in this class.
 *
 * @param theme  the theme (<code>null</code> not permitted).
 *
 * @see #getChartTheme()
 * @see ChartUtilities#applyCurrentTheme(JFreeChart)
 *
 * @since 1.0.11
 */
public static void setChartTheme(ChartTheme theme) {
    if (theme == null) {
        throw new IllegalArgumentException("Null 'theme' argument.");
    }
    currentTheme = theme;

    // here we do a check to see if the user is installing the "Legacy"
    // theme, and reset the bar painters in that case...
    if (theme instanceof StandardChartTheme) {
        StandardChartTheme sct = (StandardChartTheme) theme;
        if (sct.getName().equals("Legacy")) {
            BarRenderer.setDefaultBarPainter(new StandardBarPainter());
            XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
        }
        else {
            BarRenderer.setDefaultBarPainter(new GradientBarPainter());
            XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
        }
    }
}
 
开发者ID:lulab,项目名称:PI,代码行数:32,代码来源:ChartFactory.java

示例11: enableFlatLook

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
public static void enableFlatLook(final boolean flat) {
	if (flat) {
		BarRenderer.setDefaultBarPainter(new StandardBarPainter());
		BarRenderer.setDefaultShadowsVisible(false);
		XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
		XYBarRenderer.setDefaultShadowsVisible(false);
		StackedBarRenderer.setDefaultBarPainter(new StandardBarPainter());
		StackedBarRenderer.setDefaultShadowsVisible(false);
	} else {
		BarRenderer.setDefaultBarPainter(new GradientBarPainter());
		BarRenderer.setDefaultShadowsVisible(true);
		XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
		XYBarRenderer.setDefaultShadowsVisible(true);
		StackedBarRenderer.setDefaultBarPainter(new GradientBarPainter());
		StackedBarRenderer.setDefaultShadowsVisible(true);
	}
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:18,代码来源:ChartJFreeChartOutputHistogram.java

示例12: setTheme

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
private final void setTheme(final JFreeChart chart) {
	final XYPlot plot = (XYPlot) chart.getPlot();
	final XYBarRenderer r = (XYBarRenderer) plot.getRenderer();
	final StandardXYBarPainter bp = new StandardXYBarPainter();
	r.setBarPainter(bp);
	r.setSeriesOutlinePaint(0, Color.lightGray);
	r.setShadowVisible(false);
	r.setDrawBarOutline(false);
	setBackgroundDefault(chart);
	final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();

	// rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
	rangeAxis.setTickLabelsVisible(false);
	rangeAxis.setTickMarksVisible(false);
	final NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
	domainAxis.setTickLabelsVisible(false);
	domainAxis.setTickMarksVisible(false);
}
 
开发者ID:imagej,项目名称:imagej-ui-swing,代码行数:19,代码来源:SwingHistogramWidget.java

示例13: ChartMain

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
public ChartMain(Date startDate, JFreeChartTimePeriod jFreeTimePeriod) {
    super();

    this.jFreeTimePeriod = jFreeTimePeriod;
    UIManager.put("ToolTip.background", new java.awt.Color(239, 203, 152, 255));
    UIManager.put("ToolTip.foreground", java.awt.Color.BLACK);

    //ToolTipManager.sharedInstance().setInitialDelay(100);
    ToolTipManager.sharedInstance().setInitialDelay(20);
    //ToolTipManager.sharedInstance().setReshowDelay(0);
    ToolTipManager.sharedInstance().setDismissDelay(120000);

    XYBarRenderer.setDefaultShadowsVisible(false);
    XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());

    barChartDisplayStrategy = new ChartBarSquare(this);

    lineAnnotations = new HashMap<Long, XYTextAnnotation>();

}
 
开发者ID:premiummarkets,项目名称:pm,代码行数:21,代码来源:ChartMain.java

示例14: createChart

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
protected JFreeChart createChart( final IntervalXYDataset dataset, final String title, final String units )
{
	final JFreeChart chart = ChartFactory.createXYBarChart(
		title,
		"Distance [" + units + "]",
		false,
		"Count",
		dataset,
		PlotOrientation.VERTICAL,
		false, // legend
		false,
		false );

	final NumberAxis range = (NumberAxis) chart.getXYPlot().getDomainAxis();
	range.setRange( getMin(), getMax() );

	final XYPlot plot = chart.getXYPlot();
	final XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();

	renderer.setSeriesPaint( 0, Color.red );
	renderer.setDrawBarOutline( true );
	renderer.setSeriesOutlinePaint( 0, Color.black );
	renderer.setBarPainter( new StandardXYBarPainter() );

	return chart;
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:27,代码来源:Histogram.java

示例15: setChartTheme

import org.jfree.chart.renderer.xy.StandardXYBarPainter; //导入依赖的package包/类
public static void setChartTheme() {
    StandardChartTheme chartTheme = new StandardChartTheme("CN");
    chartTheme.setExtraLargeFont(FONT);
    chartTheme.setRegularFont(FONT);
    chartTheme.setLargeFont(FONT);
    chartTheme.setSmallFont(FONT);
    chartTheme.setTitlePaint(new Color(51, 51, 51));
    chartTheme.setSubtitlePaint(new Color(85, 85, 85));

    chartTheme.setLegendBackgroundPaint(Color.WHITE);
    chartTheme.setLegendItemPaint(Color.BLACK);//
    chartTheme.setChartBackgroundPaint(Color.WHITE);

    Paint[] OUTLINE_PAINT_SEQUENCE = new Paint[]{Color.WHITE};
    DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(CHART_COLORS, CHART_COLORS, OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    chartTheme.setDrawingSupplier(drawingSupplier);

    chartTheme.setPlotBackgroundPaint(Color.WHITE);
    chartTheme.setPlotOutlinePaint(Color.WHITE);
    chartTheme.setLabelLinkPaint(new Color(8, 55, 114));
    chartTheme.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);

    chartTheme.setAxisOffset(new RectangleInsets(5, 12, 5, 12));
    chartTheme.setDomainGridlinePaint(new Color(192, 208, 224));
    chartTheme.setRangeGridlinePaint(new Color(192, 192, 192));

    chartTheme.setBaselinePaint(Color.WHITE);
    chartTheme.setCrosshairPaint(Color.BLUE);
    chartTheme.setAxisLabelPaint(new Color(51, 51, 51));
    chartTheme.setTickLabelPaint(new Color(67, 67, 72));
    chartTheme.setBarPainter(new StandardBarPainter());
    chartTheme.setXYBarPainter(new StandardXYBarPainter());

    chartTheme.setItemLabelPaint(Color.black);
    chartTheme.setThermometerPaint(Color.white);

    ChartFactory.setChartTheme(chartTheme);
}
 
开发者ID:Fanping,项目名称:iveely.ml,代码行数:41,代码来源:ChartUtils.java


注:本文中的org.jfree.chart.renderer.xy.StandardXYBarPainter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。