List of usage examples for org.jfree.chart.renderer.category LineAndShapeRenderer setAutoPopulateSeriesShape
public void setAutoPopulateSeriesShape(boolean auto)
From source file:sanger.team16.gui.genevar.eqtl.query.SNPGeneAssocPlot.java
private JFreeChart createChart(String populationName, CategoryDataset categoryDataset, double max, double min) { CategoryAxis categoryaxis = new CategoryAxis(); categoryaxis.setCategoryLabelPositions(CategoryLabelPositions.STANDARD); //categoryaxis.setMaximumCategoryLabelWidthRatio(5F); //categoryaxis.setMaximumCategoryLabelLines(141); //categoryaxis.setCategoryMargin(450); LineAndShapeRenderer lineandshaperenderer = new LineAndShapeRenderer(); lineandshaperenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); lineandshaperenderer.setBaseShapesFilled(false); lineandshaperenderer.setBaseShape(ShapeUtilities.createDiamond((float) 3)); lineandshaperenderer.setBaseSeriesVisibleInLegend(false); //lineandshaperenderer.setBaseLinesVisible(false); lineandshaperenderer.setAutoPopulateSeriesShape(false); lineandshaperenderer.setAutoPopulateSeriesPaint(false); //lineandshaperenderer.findRangeBounds(categoryDataset); NumberAxis numberaxis = new NumberAxis("Expression"); numberaxis.setAutoRangeIncludesZero(false); //numberaxis.setRangeWithMargins(min, max); CategoryPlot categoryplot = new CategoryPlot(categoryDataset, categoryaxis, numberaxis, lineandshaperenderer);//from ww w . ja va 2s .co m categoryplot.setDomainGridlinesVisible(false); categoryplot.setOrientation(PlotOrientation.VERTICAL); JFreeChart jfreechart = new JFreeChart(populationName, new Font("SansSerif", 1, 14), categoryplot, true); return jfreechart; }