|
|
@ -907,7 +907,12 @@ public class AxisSettings extends Observable implements SettingOwner |
|
|
if (gridInterval.getDoubleValue() != numAxis.getTickUnit().getSize()) |
|
|
if (gridInterval.getDoubleValue() != numAxis.getTickUnit().getSize()) |
|
|
{ |
|
|
{ |
|
|
// FIXME: With i.e. interval 0.01 it rounds "0.10" to "0.1" |
|
|
// FIXME: With i.e. interval 0.01 it rounds "0.10" to "0.1" |
|
|
numAxis.setTickUnit(new NumberTickUnit(gridInterval.getDoubleValue())); |
|
|
|
|
|
|
|
|
numAxis.setTickUnit(new NumberTickUnit(gridInterval.getDoubleValue())); |
|
|
|
|
|
// Some experimental code to make axis display only odd numbers: |
|
|
|
|
|
/*if (axisShouldOnlyShowOdd) numAxis.setNumberFormatOverride(new DecimalFormat() |
|
|
|
|
|
{ public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) { |
|
|
|
|
|
return ((int)number % 2 == 0) ? new StringBuffer("") : super.format(number, toAppendTo, pos); |
|
|
|
|
|
} });*/ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|