Skip to content

Commit a6a6116

Browse files
Fixes in KDocs (#290)
1 parent e9ef5c7 commit a6a6116

File tree

6 files changed

+55
-29
lines changed

6 files changed

+55
-29
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,15 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
2626
* Computed variables:
2727
*
2828
* - ..density.. : density estimate (mapped by default).
29-
* - ..count.. : density * number of points (corresponds to number of nearby points for ``'neighbours'`` method).
29+
* - ..count.. : density * number of points (corresponds to number of nearby points for `"neighbours"` method).
3030
* - ..scaled.. : density estimate, scaled to maximum of 1.
3131
3232
* To hide axis tooltips, set "blank" or the result of `elementBlank()`
3333
* to the `axisTooltip`, `axisTooltipX` or `axisTooltipY` parameter of the `theme()`.
3434
*
35-
* ## Examples
36-
*
37-
*
3835
* @param data The data to be displayed in this layer. If null, the default, the data
3936
* is inherited from the plot data as specified in the call to [letsPlot][org.jetbrains.letsPlot.letsPlot].
40-
* @param stat default = `Stat.pointdensity()`. The statistical transformation to use on the data for this layer.
37+
* @param stat default = `Stat.pointDensity()`. The statistical transformation to use on the data for this layer.
4138
* Supported transformations: `Stat.identity`, `Stat.bin()`, `Stat.count()`, etc. see [Stat][org.jetbrains.letsPlot.Stat].
4239
* @param position Position adjustment: `positionIdentity`, `positionStack()`, `positionDodge()`, etc.
4340
* see [Position](https://lets-plot.org/kotlin/-lets--plot--kotlin/org.jetbrains.letsPlot.pos/).
@@ -62,7 +59,8 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
6259
* @param fill Fill color.
6360
* For more info see: [aesthetics.html#color-and-fill](https://lets-plot.org/kotlin/aesthetics.html#color-and-fill).
6461
* @param weight Used by "density" stat to compute weighted density.
65-
* @param method One of `"auto"`, `"neighbours"`, `"kde2d"` (default = `"auto"`). Method to compute the density estimate:
62+
* @param method default = "auto" ("auto", "neighbours", "kde2d").
63+
* Method to compute the density estimate:
6664
* - `"neighbours"` - estimates density from the number of nearby points.
6765
* - `"kde2d"` - estimates density using a smoothed 2D kernel density.
6866
* - `"auto"` - automatically selects an estimation method based on data size.

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

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

1010
/**
11-
* @property group Grouping key. If not set, grouping may be inferred from other aesthetics (e.g., color, size).
11+
* ## Data Grouping
12+
*
13+
* The `group` parameter is not a true aesthetic but controls how data is grouped for visualization:
14+
*
15+
* **Default Grouping Behavior:**
16+
*
17+
* Lets-Plot automatically groups data by discrete variables mapped to aesthetics like `color`, `shape`, `linetype`, etc.
18+
* This creates separate visual elements (lines, paths, polygons) for each unique combination of these variables.
19+
*
20+
* **Explicit Group Control:**
21+
*
22+
* - Use `group = "variableName"` to group only by that specific variable, overriding default grouping
23+
*
24+
* - Use `group = listOf("var1", "var2", ...)` to group by the interaction of multiple variables
25+
*
26+
* - Use `group = emptyList()` to disable all the grouping completely
27+
*
28+
* @property group Data grouping control (not a true aesthetic).
29+
* Use a variable name to group by that variable,
30+
* a list of variables to group by their interaction,
31+
* or an empty list to disable all grouping.
1232
*/
1333
interface WithGroupOption {
1434
val group: Any?

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import org.jetbrains.letsPlot.intern.OptionsCapsule
1515
* or a Double array of length 2. Only used when `method = "kde2d"`.
1616
* @property kernel The kernel used for KDE. One of `"gaussian"`, `"cosine"`, `"optcosine"`, `"rectangular"`/`"uniform"`,
1717
* `"triangular"`, `"biweight"`/`"quartic"`, `"epanechikov"`/`"parabolic"`. Only used when `method = "kde2d"`.
18-
* @property method One of `"auto"`, `"neighbours"`, `"kde2d"` (default = `"auto"`). Method to compute the density estimate:
18+
* @property method default = "auto" ("auto", "neighbours", "kde2d").
19+
* Method to compute the density estimate:
1920
* - `"neighbours"` - estimates density from the number of nearby points.
2021
* - `"kde2d"` - estimates density using a smoothed 2D kernel density.
2122
* - `"auto"` - automatically selects an estimation method based on data size.

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/theme.kt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import org.jetbrains.letsPlot.intern.filterNonNullValues
4141
*
4242
* - [superscript_exponent.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/superscript_exponent.ipynb)
4343
*
44-
* @param exponentFormat default="e" ("e", "pow", "pow_full").
44+
* @param exponentFormat default="pow" ("e", "pow", "pow_full").
4545
* Controls the appearance of numbers formatted with "e" or "g" types.
4646
*
4747
* Value is either a string - style, or a list: `listOf(style, lower_exp_bound, upper_exp_bound)`
@@ -527,7 +527,7 @@ class theme(
527527
}
528528

529529
/**
530-
* Specifies how non-data components of the plot are drawn.
530+
* Specify how non-data components of the plot are drawn.
531531
* This theme element draws nothing, and assigns no space.
532532
*
533533
* ## Examples
@@ -538,7 +538,7 @@ fun elementBlank() = mapOf(Option.Theme.Elem.BLANK to true)
538538

539539

540540
/**
541-
* Specifies how non-data components of the plot are drawn.
541+
* Specify how non-data components of the plot are drawn.
542542
* This theme element draws borders and backgrounds.
543543
*
544544
* ## Examples
@@ -570,7 +570,7 @@ fun elementRect(
570570

571571

572572
/**
573-
* Specifies how non-data components of the plot are drawn.
573+
* Specify how non-data components of the plot are drawn.
574574
* This theme element draws lines.
575575
*
576576
* ## Examples
@@ -599,7 +599,7 @@ fun elementLine(
599599

600600

601601
/**
602-
* Specifies how non-data components of the plot are drawn.
602+
* Specify how non-data components of the plot are drawn.
603603
* This theme element draws text.
604604
*
605605
* ## Examples
@@ -657,9 +657,16 @@ fun elementText(
657657

658658

659659
/**
660-
* Specifies how non-data components of the plot are drawn.
660+
* Specify how non-data components of the plot are drawn.
661661
* This theme element draws text with Markdown support.
662662
*
663+
* Supported features:
664+
*
665+
* - Emphasis (*, **, ***, _, __, ___)
666+
* - Coloring with inline style (`<span style='color:red'>text</span>`)
667+
* - Links with anchor tags (`<a href="https://lets-plot.org">Lets-Plot</a>`). Supports target attribute (default is `"_blank"`)
668+
* - Multiple lines using double space and a newline delimiter ( `\n`)
669+
*
663670
* ## Examples
664671
*
665672
* - [markdown.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/markdown.ipynb)

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/themeFlavors.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.jetbrains.letsPlot.intern.OptionsMap
1212

1313

1414
/**
15-
* Darcula color scheme.
15+
* Set the Darcula color scheme.
1616
*
1717
* ## Examples
1818
*
@@ -24,7 +24,7 @@ fun flavorDarcula() = OptionsMap(
2424
)
2525

2626
/**
27-
* Solarized light color scheme.
27+
* Set the Solarized Light color scheme.
2828
*
2929
* ## Examples
3030
*
@@ -36,7 +36,7 @@ fun flavorSolarizedLight() = OptionsMap(
3636
)
3737

3838
/**
39-
* Solarized dark color scheme.
39+
* Set the Solarized Dark color scheme.
4040
*
4141
* ## Examples
4242
*
@@ -48,7 +48,7 @@ fun flavorSolarizedDark() = OptionsMap(
4848
)
4949

5050
/**
51-
* High contrast light color scheme.
51+
* Set a high-contrast light color scheme.
5252
*
5353
* ## Examples
5454
*
@@ -60,7 +60,7 @@ fun flavorHighContrastLight() = OptionsMap(
6060
)
6161

6262
/**
63-
* High contrast dark color scheme.
63+
* Set a high-contrast dark color scheme.
6464
*
6565
* ## Examples
6666
*
@@ -72,7 +72,7 @@ fun flavorHighContrastDark() = OptionsMap(
7272
)
7373

7474
/**
75-
* Set the themes default color scheme.
75+
* Set the theme's default color scheme.
7676
* Use to override other flavors or to make defaults explicit.
7777
*
7878
*/

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/themeSet.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.jetbrains.letsPlot.intern.OptionsMap
1212

1313

1414
/**
15-
* Grey background and white gridlines. The same as themeGray().
15+
* Set the grey background and white gridlines. The same as `themeGray()`.
1616
*
1717
* ## Examples
1818
*
@@ -26,7 +26,7 @@ fun themeGrey() = OptionsMap(
2626

2727

2828
/**
29-
* Gray background and white gridlines. The same as themeGrey().
29+
* Set the gray background and white gridlines. The same as `themeGrey()`.
3030
*
3131
* ## Examples
3232
*
@@ -40,7 +40,7 @@ fun themeGray() = OptionsMap(
4040

4141

4242
/**
43-
* Grey lines on white background with dark grey plot border.
43+
* Set a dark grey plot border and grey gridlines on the white background.
4444
*
4545
* ## Examples
4646
*
@@ -54,7 +54,7 @@ fun themeBW() = OptionsMap(
5454

5555

5656
/**
57-
* Light grey lines of various widths on white background.
57+
* Set the light grey lines of various widths on the white background.
5858
*
5959
* ## Examples
6060
*
@@ -68,7 +68,7 @@ fun themeLight() = OptionsMap(
6868

6969

7070
/**
71-
* Dark grey axes and no gridlines.
71+
* Set the dark grey axes and no gridlines on the white background.
7272
*
7373
* ## Examples
7474
*
@@ -82,7 +82,7 @@ fun themeClassic() = OptionsMap(
8282

8383

8484
/**
85-
* A minimalistic theme without axes lines.
85+
* Set a minimalistic theme without axes lines.
8686
*
8787
* ## Examples
8888
*
@@ -96,7 +96,7 @@ fun themeMinimal() = OptionsMap(
9696

9797

9898
/**
99-
* Default theme similar to `themeMinimal()` but with x-axis line and only major grid lines.
99+
* Set the default theme similar to `themeMinimal()` adding an x-axis line and only major gridlines.
100100
*
101101
* ## Examples
102102
*
@@ -110,7 +110,7 @@ fun themeMinimal2() = OptionsMap(
110110

111111

112112
/**
113-
* Basic settings are applied.
113+
* Set a basic blue-accented scheme with the light blue background.
114114
*
115115
* ## Examples
116116
*
@@ -124,7 +124,7 @@ fun themeNone() = OptionsMap(
124124

125125

126126
/**
127-
* A completely blank (or "void") background theme: no borders, axes, or gridlines.
127+
* Set a completely blank (or "void") background theme by removing all non-data elements: no borders, axes, or gridlines.
128128
*
129129
* ## Examples
130130
*

0 commit comments

Comments
 (0)