Remove axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
yannJFreeChart
Posts: 13
Joined: Tue May 15, 2012 2:17 pm
antibot: No, of course not.

Remove axis

Post by yannJFreeChart » Fri Jun 01, 2012 2:39 pm

Hello,

I would like to remove the axis on a jfreechart graph.
Do you know how to do ?

For the x-axis I saw that we can do :

Code: Select all

ValueAxis range = plot2.getRangeAxis();
		range.setVisible(false);

remiohead
Posts: 201
Joined: Fri Oct 02, 2009 3:53 pm
antibot: No, of course not.

Re: Remove axis

Post by remiohead » Fri Jun 01, 2012 7:16 pm

The same method is available in all classes derived from org.jfree.chart.axis.Axis. Looking at your code fragment this will probably do it for you:

Code: Select all

plot2.getDomainAxis().setVisible(false);

Locked