Skip to content

howto logarithmic axis

Erich Seifert edited this page Mar 14, 2016 · 1 revision

How can I use a logarithmic axis?

GRAL's Plot class allows you to set arbitrary renderers for any axis of the plot. Those renderers are responsible for how the axis will be rendered. At the moment there are two renderers you can use:

Here a snippet on how you can use a logarithmic renderer on an existing XYPlot:

AxisRenderer rendererX = new LogarithmicRenderer2D();
rendererX.setLabel("Logarithmic axis");
plot.setAxisRenderer(XYPlot.AXIS_X, rendererX);