Skip to content

Commit b8d42a1

Browse files
Updates and fixes in KDocs.
1 parent 8ddfac5 commit b8d42a1

Some content is hidden

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

41 files changed

+264
-191
lines changed

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/annotations/AnnotationOptions.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ typealias AnnotationOptions = layerLabels
1111

1212

1313
/**
14-
* Configure annotations for geometry layers.
14+
* Configure annotations for geometry layers.
1515
*
1616
* Annotations are currently supported for bar, pie, and crossbar geometry
1717
* layers. This class provides methods to customize the appearance and
1818
* content of text labels displayed on these geometries.
1919
*
20-
* Notes
21-
* -----
20+
* ## Notes
21+
*
2222
* By default, annotation text color is automatically selected for optimal
2323
* contrast: white text appears on darker filled geometries, and black text
2424
* appears on lighter filled geometries.
@@ -137,6 +137,14 @@ class layerLabels(vararg variables: String) {
137137
return setOption(ANNOTATION_SIZE, value)
138138
}
139139

140+
141+
/**
142+
* Use the layer's color for the annotation text.
143+
*
144+
* When enabled, the annotation text will inherit the color from the
145+
* layer it's associated with, rather than using a default or
146+
* explicitly set color.
147+
*/
140148
fun inheritColor(): layerLabels {
141149
return setOption(USE_LAYER_COLOR, true)
142150
}

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/bistro/corr/CorrPlot.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import kotlin.math.min
3636
/**
3737
* Correlation plot builder.
3838
*
39-
* The terminal `build()` method will create a fully configured 'Plot' (i.e. Figure) object.
39+
* The terminal `build()` method will create a fully configured 'Plot' (i.e., Figure) object.
4040
*
4141
* ## Notes
4242
*

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/bistro/waterfall/WaterfallPlot.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ package org.jetbrains.letsPlot.bistro.waterfall
2525
* @param x Name of a variable.
2626
* @param y Name of a numeric variable.
2727
* @param measure Kind of a calculation.
28-
* Values in 'measure' column could be:
28+
* It takes the name of a data column.
29+
* The values in the column could be:
2930
* - "absolute" - the value is shown as is;
3031
* - "relative" - the value is shown as a difference from the previous value;
3132
* - "total" - the value is shown as a cumulative sum of all previous values.
@@ -35,9 +36,13 @@ package org.jetbrains.letsPlot.bistro.waterfall
3536
* @param color Color of the box boundary lines.
3637
* For more info see: [aesthetics.html#color-and-fill](https://lets-plot.org/kotlin/aesthetics.html#color-and-fill).
3738
* Use "flow_type" to color lines by the direction of the flow.
39+
* Flow type names: "Absolute", "Increase", "Decrease" and "Total".
40+
* You could use these names to change the default colors with the `scaleColorManual()` function.
3841
* @param fill Fill color of the boxes.
3942
* For more info see: [aesthetics.html#color-and-fill](https://lets-plot.org/kotlin/aesthetics.html#color-and-fill).
4043
* Use "flow_type" to color boxes by the direction of the flow.
44+
* Flow type names: "Absolute", "Increase", "Decrease" and "Total".
45+
* You could use these names to change the default colors with the `scaleFillManual()` function.
4146
* @param size default = 0.0.
4247
* Line width of the box boundary lines.
4348
* @param alpha Transparency level of the boxes. Understands numbers between 0 and 1.

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_bar.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
2323

2424
@Suppress("ClassName")
2525
/**
26-
* Displays a bar chart which makes the height of the bar proportional to the number of observed variable values, mapped to x-axis.
26+
* Display a bar chart which makes the height of the bar proportional to the number of observed variable values, mapped to the x-axis.
2727
*
2828
* ## Notes
2929
*
3030
* Computed variables:
3131
*
32-
* - ..count.. : number of points with same x-axis coordinate.
33-
* - ..sum.. : total number of points with same x-axis coordinate.
32+
* - ..count.. : number of points with the same x-axis coordinate.
33+
* - ..sum.. : total number of points with the same x-axis coordinate.
3434
* - ..prop.. : groupwise proportion.
3535
* - ..proppct.. : groupwise proportion in percent.
36-
* - ..sumprop.. : proportion of points with same x-axis coordinate among all points in the dataset.
37-
* - ..sumpct.. : proportion of points with same x-axis coordinate among all points in the dataset in percent.
36+
* - ..sumprop.. : proportion of points with the same x-axis coordinate among all points in the dataset.
37+
* - ..sumpct.. : proportion of points with the same x-axis coordinate among all points in the dataset in percent.
3838
*
3939
* To hide axis tooltips, set "blank" or the result of `elementBlank()`
4040
* to the `axisTooltip` or `axisTooltipX` parameter of the `theme()`.

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_bin2d.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
7474
* a hex string (up to 8 digits for dash-gap lengths),
7575
* or a pattern `offset to listOf(dash, gap, ...)` / `listOf(dash, gap, ...)`.
7676
* For more info see: [aesthetics.html#line-types](https://lets-plot.org/kotlin/aesthetics.html#line-types).
77-
* @param size Line width, default = 0 (i.e. tiles outline initially is not visible).
77+
* @param size Line width, default = 0 (i.e., tiles outline initially is not visible).
7878
* @param weight Used by `Stat.bin2D()`stat to compute weighted sum instead of simple count.
7979
* @param colorBy default = "color" ("fill", "color", "paint_a", "paint_b", "paint_c").
8080
* Defines the color aesthetic for the geometry.

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_blank.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
6868
* @param size Size of the point.
6969
* @param stroke Width of the shape border. Applied only to the shapes having border.
7070
* @param angle Rotation angle of the shape, in degrees.
71-
* @param sizeUnit Relates the size of the point to the length of the unit step along one of the axes.
72-
* Possible values: "x", "y". If not specified, no fitting is performed.
71+
* @param sizeUnit ("x", "y", "min", "max").
72+
* Relate the size of the geom to the length of the unit step along one of the axes.
73+
* "x" uses the unit step along the x-axis, "y" uses the unit step along the y-axis.
74+
* "min" uses the smaller of the unit steps along the x- and y-axes.
75+
* "max" uses the larger of the unit steps along the x- and y-axes.
76+
* If not specified, no fitting is performed.
7377
* @param colorBy default = "color" ("fill", "color", "paint_a", "paint_b", "paint_c").
7478
* Defines the color aesthetic for the geometry.
7579
* @param fillBy default = "fill" ("fill", "color", "paint_a", "paint_b", "paint_c").

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_contour.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
2020

2121
@Suppress("ClassName")
2222
/**
23-
* Displays contours of a 3d surface in 2d.
23+
* Displays contours of a 3D surface in 2D.
2424
*
2525
* ## Notes
2626
*

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_contourf.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
2020

2121
@Suppress("ClassName")
2222
/**
23-
* Fills contours of a 3d surface in 2d.
23+
* Fills contours of a 3D surface in 2D.
2424
*
2525
* ## Notes
2626
*

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_count.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
1717
*
1818
* Computed variables:
1919
*
20-
* - ..n.. : number of points with same x-axis and y-axis coordinates.
21-
* - ..prop.. : proportion of points with same x-axis and y-axis coordinates.
22-
* - ..proppct.. : proportion of points with same x-axis and y-axis coordinates in percent.
20+
* - ..n.. : number of points with the same x-axis and y-axis coordinates.
21+
* - ..prop.. : proportion of points with the same x-axis and y-axis coordinates.
22+
* - ..proppct.. : proportion of points with the same x-axis and y-axis coordinates in percent.
2323
*
2424
* To hide axis tooltips, set "blank" or the result of `elementBlank()`
2525
* to the `axisTooltip`, `axisTooltipX` or `axisTooltipY` parameter of the `theme()`.

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_density2d.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
6060
* or a Double array of length 2.
6161
* @param n The number of sampled points for plotting the function (on x and y direction correspondingly).
6262
* @param adjust Adjusts the value of bandwidth by multiplying it. Changes how smooth the frequency curve is.
63-
* @param contour If true, contour the results of the 2d density estimation.
63+
* @param contour If true, contour the results of the 2D density estimation.
6464
* @param bins Number of levels.
6565
* @param binWidth Distance between levels.
6666
* @param weight Used by density stat to compute weighted density.

0 commit comments

Comments
 (0)