Package uk.ac.starlink.ttools.plot2
Class Trimming
java.lang.Object
uk.ac.starlink.ttools.plot2.Trimming
Aggregates static items that decorate a rectangular plotting area.
The area may be that occupied by a single plot zone or
by a collection of zones.
- Since:
- 14 Jul 2023
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns legend icon.float[]
Returns legend position if internal legend is required.getTitle()
Returns plot title if required.
-
Constructor Details
-
Trimming
Constructor.- Parameters:
legend
- legend icon if required, or nulllegPos
- legend position if internal legend is required; 2-element (x,y) array, each element in range 0-1title
- title text, or null
-
-
Method Details
-
getLegend
Returns legend icon.- Returns:
- legend icon, or null
-
getLegendPosition
public float[] getLegendPosition()Returns legend position if internal legend is required. The numeric values refer to the fractional distance in each dimension at which the legend is positioned within the target rectangular region.- Returns:
- 2-element (x,y) array, each element in range 0-1, or null
-
getTitle
Returns plot title if required.- Returns:
- title text, or null
-