Example usage for org.jfree.chart.axis LogAxis setTickMarksVisible

List of usage examples for org.jfree.chart.axis LogAxis setTickMarksVisible

Introduction

In this page you can find the example usage for org.jfree.chart.axis LogAxis setTickMarksVisible.

Prototype

public void setTickMarksVisible(boolean flag) 

Source Link

Document

Sets the flag that indicates whether or not the tick marks are showing and sends an AxisChangeEvent to all registered listeners.

Usage

From source file:edu.scripps.fl.curves.plot.CurvePlot.java

public void init() {
    dataset = new YIntervalSeriesCollection();
    LogAxis xAxis = new LogAxis(xAxisLabel) {
        @Override/*from  w w w.j a va 2  s.c  o m*/
        public NumberFormat getNumberFormatOverride() {
            return nf;
        }

        protected String createTickLabel(double value) {
            return getNumberFormatOverride().format(value);
        }
    };
    xAxis.setTickUnit(new NumberTickUnit(1.0, nf));
    xAxis.setTickMarksVisible(true);
    // xAxis.setTickLabelFont(font); // now set in separate method
    NumberAxis yAxis = new NumberAxis(yAxisLabel);
    //      yAxis.setRange(-20, 120);
    // yAxis.setTickLabelFont(font);
    yAxis.setTickUnit(new NumberTickUnit(25));
    plot = new XYPlot(dataset, xAxis, yAxis, null);
    plot.setDomainGridlinesVisible(false);
    plot.setRangeGridlinesVisible(false);
    plot.setRangeMinorGridlinesVisible(true);
    // XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    MyXYErrorRenderer renderer = new MyXYErrorRenderer();
    plot.setRenderer(renderer);
    plot.setBackgroundPaint(Color.WHITE);
    chart = new JFreeChart("", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
    chart.setBackgroundPaint(Color.WHITE);
    plot.setDrawingSupplier(new CurvePlotDrawingSupplier());
}