# Class FloatingCoordAuxReader

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.FloatingCoordAuxReader

All Implemented Interfaces:
  `AuxReader`

public class FloatingCoordAuxReader extends Object implements AuxReader
AuxReader implementation that extends ranges simply by sampling a given scalar floating coordinate for all plottable points.

Since:
  16 Jan 2015
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`FloatingCoordAuxReader(FloatingCoord coord, int icol, DataGeom geom, boolean visibleOnly, Scaling scaling)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`adjustAuxRange(Surface surface, DataSpec dataSpec, DataStore dataStore, Object[] plans, Ranger ranger)`
May use the supplied data specification to update (usually extend) the given range.
`uk.ac.starlink.table.ValueInfo`
`getAxisInfo(DataSpec dataSpec)`
Attempts to provide information suitable for labelling the axis corresponding to the values ranged by this reader.
`int`
`getCoordIndex()`
Returns the DataSpec index for the coordinate whose value is used by this reader.
`Scaling`
`getScaling()`
Returns a scaling that will be used on the result of the aux ranging done by this reader, if any.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FloatingCoordAuxReader

public FloatingCoordAuxReader(FloatingCoord coord, int icol, DataGeom geom, boolean visibleOnly, Scaling scaling)
Constructor.

Parameters:
  `coord` - coordinate reader
  `icol` - column index in tuple sequence corresponding to value
  `geom` - converts data to graphics coordinates
  `visibleOnly` - true to include only points visible in the current plot bounds, false for all potentially plottable points
  `scaling` - scaling

## Method Details

### getCoordIndex

public int getCoordIndex()
Description copied from interface: `AuxReader`
Returns the DataSpec index for the coordinate whose value is used by this reader. This is provided on a best-efforts basis; if no single coordinate fits this description, then -1 may be returned.

Specified by:
  `getCoordIndex` in interface `AuxReader`
Returns:
  DataSpec coord index for auxiliary coordinate being ranged, or -1

### getAxisInfo

public uk.ac.starlink.table.ValueInfo getAxisInfo(DataSpec dataSpec)
Description copied from interface: `AuxReader`
Attempts to provide information suitable for labelling the axis corresponding to the values ranged by this reader.

Specified by:
  `getAxisInfo` in interface `AuxReader`
Parameters:
  `dataSpec` - data specification
Returns:
  info corresponding to this reader's scale, or null if none known

### getScaling

public Scaling getScaling()
Description copied from interface: `AuxReader`
Returns a scaling that will be used on the result of the aux ranging done by this reader, if any. If no scaler will be generated from the resulting Span (no special requirements on Span behaviour), then null may be returned.

Specified by:
  `getScaling` in interface `AuxReader`
Returns:
  aux scaling type, or null

### adjustAuxRange

public void adjustAuxRange(Surface surface, DataSpec dataSpec, DataStore dataStore, Object[] plans, Ranger ranger)
Description copied from interface: `AuxReader`
May use the supplied data specification to update (usually extend) the given range. If available an array of plan objects may be supplied as well. The implementation may be able to make use of these to improve efficiency of the ranging (perhaps to avoid a data scan).

Specified by:
  `adjustAuxRange` in interface `AuxReader`
Parameters:
  `surface` - plot data destination surface
  `dataSpec` - specification for data
  `dataStore` - data storage object
  `plans` - array of available plan objects; may be empty
  `ranger` - object to be updated with range information