# Class PlaneSurfaceFactory.Profile

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.PlaneSurfaceFactory.Profile

Enclosing class:
  `PlaneSurfaceFactory`

public static class PlaneSurfaceFactory.Profile extends Object
Profile class which defines fixed configuration items for a PlaneSurface. Instances of this class are normally obtained from the `createProfile` method.

Since:
  19 Feb 2013
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`Profile(Scale xscale, Scale yscale, boolean xflip, boolean yflip, String xlabel, String ylabel, DoubleUnaryOperator x2func, DoubleUnaryOperator y2func, String x2label, String y2label, Captioner captioner, SideFlags annotateflags, double xyfactor, double xcrowd, double ycrowd, OrientationPolicy orientpolicy, boolean minor, boolean shadow, Color gridcolor, Color axlabelcolor)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`PlaneSurfaceFactory.Profile`
`fixAnnotation(SideFlags annotateFlags, boolean addSecondary)`
Returns a new profile instance the same as this one, except that the flags for which sides to annotate are replaced.
`Scale[]`
`getScales()`
Returns a 2-element array giving X and Y axis scales.

### Methods inherited from class Object

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

## Constructor Details

### Profile

public Profile(Scale xscale, Scale yscale, boolean xflip, boolean yflip, String xlabel, String ylabel, DoubleUnaryOperator x2func, DoubleUnaryOperator y2func, String x2label, String y2label, Captioner captioner, SideFlags annotateflags, double xyfactor, double xcrowd, double ycrowd, OrientationPolicy orientpolicy, boolean minor, boolean shadow, Color gridcolor, Color axlabelcolor)
Constructor.

Parameters:
  `xscale` - X axis scaling
  `yscale` - Y axis scaling
  `xflip` - whether to invert direction of X axis
  `yflip` - whether to invert direction of Y axis
  `xlabel` - text for labelling X axis
  `ylabel` - text for labelling Y axis
  `x2func` - function mapping primary to secondary X data coords, or null for no secondary X axis
  `y2func` - function mapping primary to secondary Y data coords, or null for no secondary Y axis
  `x2label` - text for labelling secondary X axis
  `y2label` - text for labelling secondary Y axis
  `captioner` - text renderer for axis labels etc
  `annotateflags` - which sides to annotate
  `xyfactor` - ratio (X axis unit length)/(Y axis unit length), or NaN to use whatever bounds shape and axis limits give you
  `xcrowd` - crowding factor for tick marks on X axis; 1 is normal
  `ycrowd` - crowding factor for tick marks on Y axis; 1 is normal
  `orientpolicy` - tick label orientation policy
  `minor` - whether to paint minor tick marks on axes
  `shadow` - whether to paint shadow ticks on opposite axes if no secondary axis
  `gridcolor` - colour of grid lines, or null for none
  `axlabelcolor` - colour of axis labels

## Method Details

### getScales

public Scale[] getScales()
Returns a 2-element array giving X and Y axis scales.

Returns:
  (xscale, yscale) array

### fixAnnotation

public PlaneSurfaceFactory.Profile fixAnnotation(SideFlags annotateFlags, boolean addSecondary)
Returns a new profile instance the same as this one, except that the flags for which sides to annotate are replaced.

Parameters:
  `annotateFlags` - which sides to annotate
  `addSecondary` - if true, secondary axis annotations duplicating the primary axis ones will be added
Returns:
  adjusted profile