Page 1 of 1

Percentage y-ticks for yield-curve

Posted: Fri Jul 30, 2004 9:45 am
by va1210
How can I change the y-axis so that it shows a %-character after the tick-label? I am plotting a yield curve and have yield percentages on Y and maturities on X..

Posted: Mon Aug 16, 2004 5:25 pm
by hongping
You could try using

org.jfree.chart.axis.NumberAxis.setNumberFormatOverride

You can pass in a java.text.NumberFormat or java.text.DecimalFormat.

NumberFormat.getPercentInstance will actually give you a format for displaying percentages. Please do look up the javadocs and examples.