Skip to content

Commit d74d434

Browse files
authored
Add comprehensive KDoc documentation to all intern stat layer files with standardized format (#286)
1 parent 7349502 commit d74d434

File tree

60 files changed

+438
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+438
-10
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ import org.jetbrains.letsPlot.intern.Options
99
import org.jetbrains.letsPlot.intern.OptionsCapsule
1010

1111
/**
12-
* 'bin2d' stat requires x,y (weight is optional)
12+
* Aesthetic properties supported by [statBin2D()][org.jetbrains.letsPlot.stat.statBin2D].
13+
*
14+
* ## Notes
15+
* The bin2d stat requires x,y (weight is optional)
16+
*
17+
* @property x X-axis value.
18+
* @property y Y-axis value.
19+
* @property weight Used by `Stat.bin2D()`stat to compute weighted sum instead of simple count.
1320
*/
1421
interface Bin2dStatAesthetics : OptionsCapsule {
1522
val x: Any?

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
package org.jetbrains.letsPlot.intern.layer.stat
77

8+
/**
9+
* Aesthetic mappings supported by [statBin2D()][org.jetbrains.letsPlot.stat.statBin2D].
10+
*
11+
* @param x X-axis value.
12+
* @param y Y-axis value.
13+
* @param weight Used by `Stat.bin2D()`stat to compute weighted sum instead of simple count.
14+
*/
815
class Bin2dStatMapping(
916
override var x: Any? = null,
1017
override var y: Any? = null,

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

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

12+
/**
13+
* Properties for parameters of [statBin2D()][org.jetbrains.letsPlot.stat.statBin2D].
14+
*
15+
* @property bins Number of bins in both directions, vertical and horizontal. Overridden by `binWidth`.
16+
* @property binWidth The width of the bins in both directions, vertical and horizontal. Overrides `bins`.
17+
* The default is to use bin widths that cover the entire range of the data.
18+
* @property drop Specifies whether to remove all bins with 0 counts.
19+
*/
1220
interface Bin2dStatParameters : OptionsCapsule {
1321
val bins: Pair<Int, Int>?
1422
val binWidth: Pair<Number?, Number?>?

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ import org.jetbrains.letsPlot.intern.Options
44
import org.jetbrains.letsPlot.intern.OptionsCapsule
55

66
/**
7-
* 'binhex' stat requires x,y (weight is optional)
7+
* Aesthetic properties supported by the default stat of [geomHex()][org.jetbrains.letsPlot.geom.geomHex].
8+
*
9+
* ## Notes
10+
* The binhex stat requires x,y (weight is optional)
11+
*
12+
* @property x X-axis value.
13+
* @property y Y-axis value.
14+
* @property weight Used to compute weighted sum instead of simple count.
815
*/
916
interface BinHexStatAesthetics : OptionsCapsule {
1017
val x: Any?

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
package org.jetbrains.letsPlot.intern.layer.stat
22

3+
/**
4+
* Aesthetic mappings supported by the default stat of [geomHex()][org.jetbrains.letsPlot.geom.geomHex].
5+
*
6+
* @param x X-axis value.
7+
* @param y Y-axis value.
8+
* @param weight Used to compute weighted sum instead of simple count.
9+
*/
310
class BinHexStatMapping(
411
override var x: Any? = null,
512
override var y: Any? = null,

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

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

7+
/**
8+
* Properties for parameters of the default stat of [geomHex()][org.jetbrains.letsPlot.geom.geomHex].
9+
*
10+
* @property bins Number of bins in both directions, vertical and horizontal. Overridden by `binWidth`.
11+
* @property binWidth The width of the bins in both directions, vertical and horizontal. Overrides `bins`.
12+
* The default is to use bin widths that cover the entire range of the data.
13+
* @property drop Specifies whether to remove all bins with 0 counts.
14+
*/
715
interface BinHexStatParameters : OptionsCapsule {
816
val bins: Pair<Int, Int>?
917
val binWidth: Pair<Number?, Number?>?

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

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

11+
/**
12+
* Aesthetic properties supported by [statBin()][org.jetbrains.letsPlot.stat.statBin].
13+
*
14+
* @property x X-axis coordinates.
15+
* @property weight Used to compute weighted sum instead of simple count.
16+
*/
1117
interface BinStatAesthetics : OptionsCapsule {
1218
val x: Any?
1319
val weight: Any?

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
package org.jetbrains.letsPlot.intern.layer.stat
77

8+
/**
9+
* Aesthetic mappings supported by [statBin()][org.jetbrains.letsPlot.stat.statBin].
10+
*
11+
* @param x X-axis coordinates.
12+
* @param weight Used to compute weighted sum instead of simple count.
13+
*/
814
class BinStatMapping(
915
override var x: Any? = null,
1016
override var weight: Any? = null

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

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

12+
/**
13+
* Properties for parameters of [statBin()][org.jetbrains.letsPlot.stat.statBin].
14+
*
15+
* @property bins Number of bins. Overridden by `binWidth`.
16+
* @property binWidth The width of the bins. The default is to use bin widths that cover
17+
* the entire range of the data. You should always override this value, exploring multiple widths
18+
* to find the best to illustrate the stories in your data.
19+
* @property center Specifies x-value to align bin centers to.
20+
* @property boundary Specifies x-value to align bin boundary (i.e., point between bins) to.
21+
* @property threshold Only bins with a `..count..` greater than the threshold will be displayed.
22+
* This is useful for free scales in facets - use threshold=0 to make the plot take up the entire panel space.
23+
*/
1224
interface BinStatParameters : OptionsCapsule {
1325
val bins: Int?
1426
val binWidth: Number?

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

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

12+
/**
13+
* Properties for parameters of [statBoxplot()][org.jetbrains.letsPlot.stat.statBoxplot].
14+
*
15+
* @property coef Length of the whiskers as multiple of IQR.
16+
*/
1217
interface BoxplotOutlierStatParameters : OptionsCapsule {
1318
@Suppress("SpellCheckingInspection")
1419
val coef: Number? // Whisker IQR ratio

0 commit comments

Comments
 (0)