Axis Scales

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

Axis Scales

Post by Lou Tylee » Wed Feb 05, 2003 3:57 pm

How do you convert the y axis in a plot to a logarithmic scale?

Arnaud

Re: Axis Scales

Post by Arnaud » Wed Feb 05, 2003 7:22 pm

Hello,

In the com.jrefinery.chart.demo.JFreeChartDemoBase class, You'll find the createTimeSeries2Chart() methods which includes the following lines that should interest You :

// [..]
XYPlot plot = chart.getXYPlot();
VerticalLogarithmicAxis vla = new VerticalLogarithmicAxis(range);
plot.setRangeAxis(vla);
// [..]

Hope it helps...

Regards,
Arnaud

Locked