List of usage examples for org.jfree.chart.axis ValueAxis setTickMarkInsideLength
public void setTickMarkInsideLength(float length)
From source file:userinterface.graph.Graph.java
/** Refactored out from load(), parses an Axis. */ public static void parseAxis(ValueAxis axis, String minValue, String maxValue, String majorGridInterval, String minorGridInterval) { double min, max, major, minor; // can't work with null axis if (axis == null) return;/*from www . ja va2 s. c om*/ try { min = Double.parseDouble(minValue); } catch (NumberFormatException e) { min = 0; } try { max = Double.parseDouble(maxValue); } catch (NumberFormatException e) { if (min < 1) { max = 1.0; } else { max = min + 1; } } try { major = Double.parseDouble(majorGridInterval); } catch (NumberFormatException e) { major = max / 5; } try { minor = Double.parseDouble(minorGridInterval); } catch (NumberFormatException e) { minor = major / 10; } // set parameters for axis axis.setLowerBound(min); axis.setUpperBound(max); axis.setTickMarkInsideLength((float) minor); axis.setTickMarkInsideLength((float) major); }