# Class PlotSpec<P,A>

java.lang.Object
uk.ac.starlink.ttools.plot2.task.PlotSpec<P,A>

public class PlotSpec<P,A> extends Object
Specifies a plot in sufficient detail to recreate it as a STILTS command.

Since:
  17 Jul 2017
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`PlotSpec(PlotType<P,A> plotType, Dimension extSize, Padding padding, ConfigMap globalConfig, ConfigMap[] zoneConfigs, TrimmingSpec[] trimSpecs, ShadeSpec[] shadeSpecs, LayerSpec[] layerSpecs)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Dimension`
`getExtSize()`
Returns the external plot size supplied at construction time.
`ConfigMap`
`getGlobalConfig()`
Returns per-plot configuration settings.
`LayerSpec[]`
`getLayerSpecs()`
Returns the layer specification array supplied at construction time.
`Padding`
`getPadding()`
Returns the external padding supplied at construction time.
`PlotType<P,A>`
`getPlotType()`
Returns the plot type supplied at construction time.
`ShadeSpec[]`
`getShadeSpecs()`
Returns the aux shade axis specifications.
`TrimmingSpec[]`
`getTrimmingSpecs()`
Returns the trimming specifications.
`ConfigMap[]`
`getZoneConfigs()`
Returns the per-zone array of zone configuration settings.

### Methods inherited from class Object

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

## Constructor Details

### PlotSpec

public PlotSpec(PlotType<P,A> plotType, Dimension extSize, Padding padding, ConfigMap globalConfig, ConfigMap[] zoneConfigs, TrimmingSpec[] trimSpecs, ShadeSpec[] shadeSpecs, LayerSpec[] layerSpecs)
Constructor.

Parameters:
  `plotType` - plot type
  `extSize` - total size of output graphic, or null
  `padding` - padding within extSize, or null
  `globalConfig` - per-plot configuration map
  `zoneConfigs` - per-zone configuration maps
  `trimSpecs` - trimming specification array, either nzone-element or 1-element for global
  `shadeSpecs` - aux shade axis specification array, either nzone-element or 1-element for global
  `layerSpecs` - specifications for each plot layer

## Method Details

### getPlotType

public PlotType<P,A> getPlotType()
Returns the plot type supplied at construction time.

Returns:
  plot type

### getExtSize

public Dimension getExtSize()
Returns the external plot size supplied at construction time.

Returns:
  total size of export graphic, or null

### getPadding

public Padding getPadding()
Returns the external padding supplied at construction time.

Returns:
  padding within extSize, or null

### getGlobalConfig

public ConfigMap getGlobalConfig()
Returns per-plot configuration settings.

Returns:
  global config map

### getZoneConfigs

public ConfigMap[] getZoneConfigs()
Returns the per-zone array of zone configuration settings.

Returns:
  nzone-element config map array

### getTrimmingSpecs

public TrimmingSpec[] getTrimmingSpecs()
Returns the trimming specifications. This is either an nzone-element array for per-zone trimmings, or a 1-element array for global trimmings.

Returns:
  nz- or 1-element array of trimming specifications

### getShadeSpecs

public ShadeSpec[] getShadeSpecs()
Returns the aux shade axis specifications. This is either an nzone-element array for per-zone aux axes, or a 1-element array for a global aux axis.

Returns:
  nz- or 1-element array of shader specifications

### getLayerSpecs

public LayerSpec[] getLayerSpecs()
Returns the layer specification array supplied at construction time.

Returns:
  specifications for each plot layer