# Class TimeStackGanger

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.StackGanger<TimeSurfaceFactory.Profile, TimeAspect>
uk.ac.starlink.ttools.plot2.geom.TimeStackGanger

All Implemented Interfaces:
  `Ganger<TimeSurfaceFactory.Profile, TimeAspect>`

public class TimeStackGanger extends StackGanger<TimeSurfaceFactory.Profile, TimeAspect>
Ganger that stacks time plots vertically with a shared time axis.

Since:
  3 Feb 2016
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final GangerFactory<TimeSurfaceFactory.Profile, TimeAspect>`
`FACTORY`
GangerFactory instance that returns TimeStackGangers.

### Fields inherited from class StackGanger

`ZONEGAP_KEY`

## Constructor Summary

Constructors
Constructor
Description
`TimeStackGanger(String[] zoneNames, Padding padding, int zoneGap)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`TimeSurfaceFactory.Profile[]`
`adjustProfiles(TimeSurfaceFactory.Profile[] profiles)`
Adjusts plot surface profiles as required for plots appearing in multiple plots within a gang.
`TimeAspect`
`fixXLimits(TimeAspect aspect, double xmin, double xmax)`
Modifies an aspect object to give it fixed data limits on the horizontal axis.
`double[]`
`getXLimits(TimeAspect aspect)`
Returns the data limits of the horizontal axis defined by a given aspect.
`boolean`
`isShadingGlobal()`
Indicates whether shared Aux colour ramps are to be applied to each zone individually or to the whole plot.
`boolean`
`isTrimmingGlobal()`
Indicates whether Trimming objects (legend and title) are to be applied to each zone individually or to the whole plot.

### Methods inherited from class StackGanger

`adjustAspects, createApproxGang, createGang, createGang, getZoneCount, getZoneNames`

### Methods inherited from class Object

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

## Field Details

### FACTORY

public static final GangerFactory<TimeSurfaceFactory.Profile, TimeAspect> FACTORY
GangerFactory instance that returns TimeStackGangers.

## Constructor Details

### TimeStackGanger

public TimeStackGanger(String[] zoneNames, Padding padding, int zoneGap)
Constructor.

Parameters:
  `zoneNames` - zone identifiers, one for each zone in the gang
  `padding` - defines user preferences, if any, for space reserved outside the whole gang
  `zoneGap` - vertical gap between zones in gang

## Method Details

### isTrimmingGlobal

public boolean isTrimmingGlobal()
Description copied from interface: `Ganger`
Indicates whether Trimming objects (legend and title) are to be applied to each zone individually or to the whole plot. For a single-zone ganger it ought not to make a difference, but false should be returned.

Returns:
  true for per-gang trimmings, false for per-zone trimmings
See Also:
  - `Trimming`

### isShadingGlobal

public boolean isShadingGlobal()
Description copied from interface: `Ganger`
Indicates whether shared Aux colour ramps are to be applied to each zone individually or to the whole plot. For a single-zone ganger it ought not to make a difference, but false should be returned.

Returns:
  true for per-gang shade axis, false for per-zone shade axis
See Also:
  - `ShadeAxisKit`

### getXLimits

public double[] getXLimits(TimeAspect aspect)
Description copied from class: `StackGanger`
Returns the data limits of the horizontal axis defined by a given aspect.

Specified by:
  `getXLimits` in class `StackGanger<TimeSurfaceFactory.Profile, TimeAspect>`
Parameters:
  `aspect` - surface aspect
Returns:
  2-element array giving (min,max) values of data coordinates on the horizontal axis

### fixXLimits

public TimeAspect fixXLimits(TimeAspect aspect, double xmin, double xmax)
Description copied from class: `StackGanger`
Modifies an aspect object to give it fixed data limits on the horizontal axis.

Specified by:
  `fixXLimits` in class `StackGanger<TimeSurfaceFactory.Profile, TimeAspect>`
Parameters:
  `aspect` - input surface aspect
  `xmin` - required lower limit on horizontal axis
  `xmax` - required upper limit on horizontal axis
Returns:
  new aspect resembling input aspect but with supplied horizontal axis limits

### adjustProfiles

public TimeSurfaceFactory.Profile[] adjustProfiles(TimeSurfaceFactory.Profile[] profiles)
Description copied from interface: `Ganger`
Adjusts plot surface profiles as required for plots appearing in multiple plots within a gang.

Specified by:
  `adjustProfiles` in interface `Ganger<TimeSurfaceFactory.Profile, TimeAspect>`
Overrides:
  `adjustProfiles` in class `StackGanger<TimeSurfaceFactory.Profile, TimeAspect>`
Parameters:
  `profiles` - unadjusted profiles
Returns:
  array of consistent profiles based on input array, same size as input