Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public class LogAxis

  1. Object
  2. Axis
  3. LogAxis

A base 10 logarithmic axis for data spanning orders of magnitude. Values at or below zero cannot be placed and are clamped to the bottom of the axis.

A log axis

Constructors

public LogAxis(int position)Creates a logarithmic axis.

Methods

protected double[] adjustBounds(double min, double max)Lets a subclass pad or round the automatic bounds; the default rounds a numeric range outward to the nearest nice step so the outermost grid lines sit on the plot edge.
protected double forward(double value)Maps a value into the space the axis is linear in; the identity here, log10 for a logarithmic axis.
protected double inverse(double t)The inverse of forward.
public double[] ticks(int maxCount)Ticks for the visible range.
protected String defaultFormat(double value, double step)The axis’ built in formatting; numbers are grouped and localized.

Inherited fields

Inherited methods

Constructor details

LogAxis

public LogAxis(int position)
Creates a logarithmic axis.

Parameters

position int
one of Axis.BOTTOM, Axis.LEFT, Axis.RIGHT or Axis.TOP

Method details

adjustBounds

protected double[] adjustBounds(double min, double max)
Lets a subclass pad or round the automatic bounds; the default rounds a numeric range outward to the nearest nice step so the outermost grid lines sit on the plot edge.

Parameters

min double
the raw minimum
max double
the raw maximum

Returns

{min, max} to use

forward

protected double forward(double value)
Maps a value into the space the axis is linear in; the identity here, log10 for a logarithmic axis. Zoom, pan and normalization all work in this space.

inverse

protected double inverse(double t)
The inverse of forward.

ticks

public double[] ticks(int maxCount)
Ticks for the visible range.

Parameters

maxCount int
the most ticks the measured label size allows

Returns

ascending tick values

defaultFormat

protected String defaultFormat(double value, double step)
The axis’ built in formatting; numbers are grouped and localized.