# Class FillPlan

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

public class FillPlan extends Object
Plan object for fill plots. This is an unweighted pixel density map (2d histogram), plus some additional compact information describing the data that falls outside of the plot density map.

Since:
  9 Dec 2016
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`static FillPlan`
`createPlan(Surface surface, DataSpec dataSpec, DataGeom geom, int icPos, DataStore dataStore)`
Creates a fill plan object for point cloud data.
`static FillPlan`
`createPlanArrays(Surface surface, DataSpec dataSpec, DataGeom geom, Function<Tuple, XYArrayData> xyReader, DataStore dataStore)`
Creates a fill plan object for XY array data.
`Binner`
`getBinner()`
Returns the object containing density map pixel counts.
`Point`
`getCpXhi()`
Returns the closest point to the upper X boundary that falls outside the grid.
`Point`
`getCpXlo()`
Returns closest point to the lower X boundary that falls outside the grid.
`Point`
`getCpYhi()`
Returns the closest point to the upper Y boundary that falls outside the grid.
`Point`
`getCpYlo()`
Returns the closest point to the lower Y boundary that falls outside the grid.
`Gridder`
`getGridder()`
Returns the object encapsulating grid geometry.
`int[]`
`getXhis()`
Returns array of bins containing all points below each pixel column.
`int[]`
`getXlos()`
Returns array of bins containing all points above each pixel column.
`int[]`
`getYhis()`
Returns array of bins containing all points to right of each pixel row.
`int[]`
`getYlos()`
Returns array of bins containing all points to left of each pixel row.
`boolean`
`matches(DataGeom geom, DataSpec dataSpec, Surface surface)`
Indicates whether this map's data is valid for a particular context.

### Methods inherited from class Object

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

## Method Details

### getBinner

public Binner getBinner()
Returns the object containing density map pixel counts.

Returns:
  binner

### getGridder

public Gridder getGridder()
Returns the object encapsulating grid geometry.

Returns:
  gridder

### getXlos

public int[] getXlos()
Returns array of bins containing all points above each pixel column.

Returns:
  xlos

### getXhis

public int[] getXhis()
Returns array of bins containing all points below each pixel column.

Returns:
  xhis

### getYlos

public int[] getYlos()
Returns array of bins containing all points to left of each pixel row.

Returns:
  ylos

### getYhis

public int[] getYhis()
Returns array of bins containing all points to right of each pixel row.

### getCpXlo

public Point getCpXlo()
Returns closest point to the lower X boundary that falls outside the grid.

Returns:
  cpXlo

### getCpXhi

public Point getCpXhi()
Returns the closest point to the upper X boundary that falls outside the grid.

Returns:
  cpXhi

### getCpYlo

public Point getCpYlo()
Returns the closest point to the lower Y boundary that falls outside the grid.

Returns:
  cpYlo

### getCpYhi

public Point getCpYhi()
Returns the closest point to the upper Y boundary that falls outside the grid.

Returns:
  cpYhi

### matches

public boolean matches(DataGeom geom, DataSpec dataSpec, Surface surface)
Indicates whether this map's data is valid for a particular context.

Parameters:
  `geom` - data geom
  `dataSpec` - data specification
  `surface` - plot surface
Returns:
  true iff this map can be used for the given params

### createPlan

public static FillPlan createPlan(Surface surface, DataSpec dataSpec, DataGeom geom, int icPos, DataStore dataStore)
Creates a fill plan object for point cloud data.

Parameters:
  `surface` - plot surface
  `dataSpec` - data specification
  `geom` - data geom
  `icPos` - position coordinate index
  `dataStore` - data store
Returns:
  new plan object

### createPlanArrays

public static FillPlan createPlanArrays(Surface surface, DataSpec dataSpec, DataGeom geom, Function<Tuple, XYArrayData> xyReader, DataStore dataStore)
Creates a fill plan object for XY array data.

Parameters:
  `surface` - plot surface
  `dataSpec` - data specification
  `geom` - data geom
  `xyReader` - function to map tuples to XYArrayData; null returns mean don't plot that tuple
  `dataStore` - data store
Returns:
  new plan object