Skip to content

Commit be2bb60

Browse files
authored
Add comprehensive KDoc documentation to plot-api intern layer package files (#287)
1 parent d74d434 commit be2bb60

File tree

11 files changed

+58
-2
lines changed

11 files changed

+58
-2
lines changed

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/GeomOptions.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ package org.jetbrains.letsPlot.intern.layer
88
import org.jetbrains.letsPlot.intern.GeomKind
99
import org.jetbrains.letsPlot.intern.Options
1010

11-
11+
/**
12+
* @param kind The geometry kind.
13+
* @param mapping Set of aesthetic mappings.
14+
*/
1215
open class GeomOptions(
1316
val kind: GeomKind,
1417
val mapping: Options = Options.empty()

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/MarginalLayer.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ package org.jetbrains.letsPlot.intern.layer
88
import org.jetbrains.letsPlot.intern.Layer
99
import org.jetbrains.letsPlot.intern.Options
1010

11+
/**
12+
* @param geomLayer The geometry layer used in the marginal layer.
13+
* @param marginalMapping Additional aesthetic mappings for marginal plots.
14+
*/
1115
internal class MarginalLayer(
1216
geomLayer: Layer,
1317
marginalMapping: Options,

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/PosOptions.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ package org.jetbrains.letsPlot.intern.layer
88
import org.jetbrains.letsPlot.intern.Options
99
import org.jetbrains.letsPlot.intern.PosKind
1010

11-
11+
/**
12+
* @param kind The position adjustment kind.
13+
* @param parameters Options for position adjustment parameters.
14+
*/
1215
class PosOptions(
1316
val kind: PosKind,
1417
val parameters: Options = Options.empty()

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/SamplingOptions.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import org.jetbrains.letsPlot.intern.Options
99
import org.jetbrains.letsPlot.intern.SamplingKind
1010
import org.jetbrains.letsPlot.intern.filterNonNullValues
1111

12+
/**
13+
* @property kind The sampling method kind.
14+
* @property isNone Whether the sampling is none (no sampling applied).
15+
* @property mapping The sampling options mapping.
16+
*/
1217
class SamplingOptions internal constructor(
1318
val kind: SamplingKind,
1419
private val options: Map<String, Any>

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/StatOptions.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ package org.jetbrains.letsPlot.intern.layer
88
import org.jetbrains.letsPlot.intern.Options
99
import org.jetbrains.letsPlot.intern.StatKind
1010

11+
/**
12+
* @param kind The statistic transformation kind.
13+
* @param mapping Set of aesthetic mappings.
14+
*/
1115
open class StatOptions(
1216
val kind: StatKind,
1317
val mapping: Options = Options.empty()

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/WithFlexColorOptions.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import org.jetbrains.letsPlot.core.spec.Option
99
import org.jetbrains.letsPlot.intern.Options
1010
import org.jetbrains.letsPlot.intern.OptionsCapsule
1111

12+
/**
13+
* @property colorBy default = "color" ("fill", "color", "paint_a", "paint_b", "paint_c").
14+
* Defines the color aesthetic for the layer.
15+
*/
1216
interface WithColorOption : OptionsCapsule {
1317
val colorBy: String?
1418

@@ -17,6 +21,10 @@ interface WithColorOption : OptionsCapsule {
1721
)
1822
}
1923

24+
/**
25+
* @property fillBy default = "fill" ("fill", "color", "paint_a", "paint_b", "paint_c").
26+
* Defines the fill aesthetic for the layer.
27+
*/
2028
interface WithFillOption : OptionsCapsule {
2129
val fillBy: String?
2230

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/WithGroupOption.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ package org.jetbrains.letsPlot.intern.layer
77

88
import org.jetbrains.letsPlot.intern.Options
99

10+
/**
11+
* @property group Grouping key. If not set, grouping may be inferred from other aesthetics (e.g., color, size).
12+
*/
1013
interface WithGroupOption {
1114
val group: Any?
1215

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/WithHeightUnitOption.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import org.jetbrains.letsPlot.core.spec.Option.Geom.Tile
44
import org.jetbrains.letsPlot.intern.Options
55
import org.jetbrains.letsPlot.intern.OptionsCapsule
66

7+
/**
8+
* @property heightUnit Unit for height values.
9+
*/
710
interface WithHeightUnitOption : OptionsCapsule {
811
val heightUnit: String?
912

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/WithSizeUnitOption.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import org.jetbrains.letsPlot.core.spec.Option.Geom.Point
99
import org.jetbrains.letsPlot.intern.Options
1010
import org.jetbrains.letsPlot.intern.OptionsCapsule
1111

12+
/**
13+
* @property sizeUnit Relate the size to the length of the unit step along one of the axes.
14+
* "x" uses the unit step along the x-axis, "y" uses the unit step along the y-axis.
15+
* "min" uses the smaller of the unit steps along the x- and y-axes.
16+
* "max" uses the larger of the unit steps along the x- and y-axes.
17+
* If not specified, no fitting is performed.
18+
*/
1219
interface WithSizeUnitOption : OptionsCapsule {
1320
val sizeUnit: String?
1421

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/intern/layer/WithSpatialParameters.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ package org.jetbrains.letsPlot.intern.layer
77

88
import org.jetbrains.letsPlot.spatial.SpatialDataset
99

10+
/**
11+
* @property map Data-structure containing series of planar shapes and, optionally, associates data series (for example:
12+
* names of States and their boundaries).
13+
* All coordinates should be encoded as decimal degrees in WGS84 coordinate reference system.
14+
* Can be used with parameter `mapJoin` for joining data and map coordinates.
15+
* @property mapJoin Pair of Names or Pair of Lists of Names.
16+
* Specifies column names to join the `data` and the `map` coordinates on.
17+
* - Pair.first: column name or list of column names in the `data` dataframe.
18+
* - Pair.second: column name or list of column names in the `map` dataframe.
19+
* @property useCRS By default, all coordinates are converted into degrees of longitude and latitude,
20+
* and these map coordinates are projected onto the screen coordinates using Mercator projection.
21+
* Specify useCRS = "provided" to keep the SpatialDataset's original coordinate reference system (CRS).
22+
*/
1023
interface WithSpatialParameters {
1124
val map: SpatialDataset?
1225
val mapJoin: Pair<Any, Any>?

0 commit comments

Comments
 (0)