Package uk.ac.starlink.ttools.plot2.geom
Class MatrixGangerFactory
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.MatrixGangerFactory
- All Implemented Interfaces:
GangerFactory<PlaneSurfaceFactory.Profile,
PlaneAspect>
public class MatrixGangerFactory
extends Object
implements GangerFactory<PlaneSurfaceFactory.Profile,PlaneAspect>
GangerFactory for use with a square matrix of Plane plots.
Histogram-like plots are expected on the diagonal, and scatter-plot
like plots on the off-diagonal cells.
- Since:
- 1 Jun 2023
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerConfigKey
Config key for gap between matrix cells.static final ConfigKey
<MatrixFormat> Config key for matrix format.static final MatrixGangerFactory
Sole instance.static final int
Maximum number of coords offered by NCOORD_KEY Specifier.static final IntegerConfigKey
Config key for number of input coordinates.static final BooleanConfigKey
Config key for whether cells are constrained to be square. -
Method Summary
Modifier and TypeMethodDescriptioncreateGanger
(Padding padding, ConfigMap config, GangContext context) Creates a ganger.ConfigKey<?>[]
Returns the configuration keys that can be used to configure the gangers produced by this factory.Returns the matrix shape that this factory will use given a set of plot types and a configuration map.boolean
Indicates whether this ganger factory has zones that can be created according to the details of the plot and controlled independently by user request.static MatrixGangerFactory
instance()
Returns the sole instance of this class.
-
Field Details
-
NCOORD_KEY
Config key for number of input coordinates. -
FORMAT_KEY
Config key for matrix format. -
SQUARES_KEY
Config key for whether cells are constrained to be square. -
CELLGAP_KEY
Config key for gap between matrix cells. -
MAX_NCOORD_GUI
public static final int MAX_NCOORD_GUIMaximum number of coords offered by NCOORD_KEY Specifier.- See Also:
-
INSTANCE
Sole instance. @seeinstance()
.
-
-
Method Details
-
hasIndependentZones
public boolean hasIndependentZones()Description copied from interface:GangerFactory
Indicates whether this ganger factory has zones that can be created according to the details of the plot and controlled independently by user request.- Specified by:
hasIndependentZones
in interfaceGangerFactory<PlaneSurfaceFactory.Profile,
PlaneAspect> - Returns:
- true iff zones can be manipulated explicitly by the user
-
getGangerKeys
Description copied from interface:GangerFactory
Returns the configuration keys that can be used to configure the gangers produced by this factory.- Specified by:
getGangerKeys
in interfaceGangerFactory<PlaneSurfaceFactory.Profile,
PlaneAspect> - Returns:
- ganger configuration keys
-
createGanger
public Ganger<PlaneSurfaceFactory.Profile,PlaneAspect> createGanger(Padding padding, ConfigMap config, GangContext context) Description copied from interface:GangerFactory
Creates a ganger.- Specified by:
createGanger
in interfaceGangerFactory<PlaneSurfaceFactory.Profile,
PlaneAspect> - Parameters:
padding
- required padding around plot areaconfig
- configuration map that may contain keys from getGangerKeyscontext
- additional context required for ganger creation- Returns:
- new ganger
-
getShape
Returns the matrix shape that this factory will use given a set of plot types and a configuration map.- Parameters:
config
- config mapplotters
- plotters generating plots on the matrix- Returns:
- matrix shape
-
instance
Returns the sole instance of this class.- Returns:
- factory instance
-