Changing X axis Tick Font

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Frank

Changing X axis Tick Font

Post by Frank » Sat Aug 24, 2002 12:29 pm

Hi, just wondering if it is possible to change the Horizontal tick Font size.
I know how to change the Y axis ticks using

NumberAxis nAxis = (NumberAxis)plot.getRangeAxis();

Font font = new Font("SansSerif", Font.PLAIN, 30); // nAxis.setTickLabelFont(font);
nAxis.setTickUnit(new NumberTickUnit(5, new DecimalFormat("0")));

Is it possible to change the X axis ticks FONT in a similar way?
Thanks in Advance
Frank

David Gilbert

Re: Changing X axis Tick Font

Post by David Gilbert » Mon Aug 26, 2002 8:32 am

If you change getRangeAxis() to getDomainAxis(), then your code should work for the horizontal axis (at least in XYPlot).

Regards,

DG.

Locked