From 21b3215ba985c84fa087594c3e426f1bdb02b619 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Mon, 10 Nov 2025 17:41:13 +0100 Subject: [PATCH 01/18] Add links to the new 'aesthetics' notebooks to the Aesthetics and Charts pages. --- Writerside/topics/aesthetics.md | 14 +++++++++++++- Writerside/topics/charts.md | 7 +++++++ Writerside/v.list | 9 +++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Writerside/topics/aesthetics.md b/Writerside/topics/aesthetics.md index 742798aa9..cb449e7eb 100644 --- a/Writerside/topics/aesthetics.md +++ b/Writerside/topics/aesthetics.md @@ -4,12 +4,16 @@ ![Point shapes](aesthetics_shape.png) +See [example notebook](%nb-aesthetics-point_shapes%). + ## Line Types ### Predefined Patterns ![Predefined line types](aesthetics_linetype.png) +See [example notebook](%nb-aesthetics-line_types-predefined_patterns%). + ### Custom Patterns Ways to specify the `linetype`: @@ -20,6 +24,8 @@ Ways to specify the `linetype`: ![Custom line types](aesthetics_custom_linetype.png) +See [example notebook](%nb-aesthetics-line_types-custom_patterns%). + ## Text ### Font Family @@ -32,12 +38,16 @@ The default font family is `'sans'`. You can also use the name of any other font installed on your system (e.g. `"Times New Roman"`). +See [example notebook](%nb-aesthetics-text_style-font_family%). + ### Font Face ![Font faces](aesthetics_font_face.png) The default font face is `'plain'`. +See [example notebook](%nb-aesthetics-text_style-font_face%). + ## Color and Fill Colors and fills of geometries can be specified in the following ways: @@ -64,4 +74,6 @@ Colors and fills of geometries can be specified in the following ways: -- An instance of the `java.awt.Color` class. \ No newline at end of file +- An instance of the `java.awt.Color` class. + +See [example notebook](%nb-aesthetics-system_colors%). \ No newline at end of file diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index 00a7f6dd3..5f8d71955 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -22,6 +22,13 @@ You can pass tidy data to *Lets-Plot* in form of a Kotlin `Map`. - Text +Examples: + +- [Point shapes](%nb-aesthetics-point_shapes%) +- [Line types](%nb-aesthetics-line_types%) +- [System colors](%nb-aesthetics-system_colors%) +- [Text](%nb-aesthetics-text_style%) + ## Basic Building Blocks Points: diff --git a/Writerside/v.list b/Writerside/v.list index a08d6878b..6ff59f4b6 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -27,6 +27,7 @@ + @@ -52,6 +53,14 @@ + + + + + + + + From b754ff205c84f8723d9e70646a7ddacf9e9825b9 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Mon, 10 Nov 2025 18:23:45 +0100 Subject: [PATCH 02/18] Add new API functions to the pages Charts, Geospatial Charts and Presentation Options. --- Writerside/topics/charts.md | 3 ++- Writerside/topics/geospatial_charts.md | 2 +- Writerside/topics/presentation_options.md | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index 5f8d71955..b06f9cc02 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -194,7 +194,8 @@ Examples: [`2d bins`](%api_geom%/geom-bin2-d/index.html), [`2d hexagonal bins`](%api_geom%/geom-hex/index.html), [`2d density`](%api_geom%/geom-density2-d/index.html), -[`filled 2d density`](%api_geom%/geom-density2-d-filled/index.html) +[`filled 2d density`](%api_geom%/geom-density2-d-filled/index.html), +[`pointdensity`](%api_geom%/geom-point-density/index.html) Examples: diff --git a/Writerside/topics/geospatial_charts.md b/Writerside/topics/geospatial_charts.md index e8af06444..2c899f1a9 100644 --- a/Writerside/topics/geospatial_charts.md +++ b/Writerside/topics/geospatial_charts.md @@ -32,7 +32,7 @@ The *Lets-Plot* library recognizes the following three 2D-geometry types: These shapes can be plotted using various geometry layers that depend on the type of the shape: -- Points : [`geomPoint`](%api_geom%/geom-point/index.html), [`geomText`](%api_geom%/geom-text/index.html), [`geomLabel`](%api_geom%/geom-label/index.html), [`geomPie`](%api_geom%/geom-pie/index.html) +- Points : [`geomPoint`](%api_geom%/geom-point/index.html), [`geomText`](%api_geom%/geom-text/index.html), [`geomLabel`](%api_geom%/geom-label/index.html), [`geomPointDensity`](%api_geom%/geom-point-density/index.html), [`geomPie`](%api_geom%/geom-pie/index.html) - Lines : [`geomPath`](%api_geom%/geom-path/index.html) - Polygons : [`geomPolygon`](%api_geom%/geom-polygon/index.html), [`geomMap`](%api_geom%/geom-map/index.html). [`geomRect`](%api_geom%/geom-rect/index.html) when used with Polygon shapes displays corresponding bounding boxes. diff --git a/Writerside/topics/presentation_options.md b/Writerside/topics/presentation_options.md index a82238f1a..37b9e9347 100644 --- a/Writerside/topics/presentation_options.md +++ b/Writerside/topics/presentation_options.md @@ -34,7 +34,7 @@ [`minimal2`](%api_theme%/theme-minimal2.html), [`bw`](%api_theme%/theme-b-w.html), -[`grey`](%api_theme%/theme-grey.html), +[`grey`](%api_theme%/theme-grey.html) (or [`gray`](%api_theme%/theme-gray.html)), [`classic`](%api_theme%/theme-classic.html), [`light`](%api_theme%/theme-light.html), [`minimal`](%api_theme%/theme-minimal.html), @@ -62,7 +62,8 @@ [`solarized light`](%api_theme%/flavor-solarized-light.html), [`solarized dark`](%api_theme%/flavor-solarized-dark.html), [`high contrast light`](%api_theme%/flavor-high-contrast-light.html), -[`high contrast dark`](%api_theme%/flavor-high-contrast-dark.html) +[`high contrast dark`](%api_theme%/flavor-high-contrast-dark.html), +[`standard`](%api_theme%/flavor-standard.html) Theme colors for geometries From 64c4c38cc472d2fa4603040cd1e88033f3dfc9f6 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Mon, 10 Nov 2025 18:46:45 +0100 Subject: [PATCH 03/18] Add new cookbooks to the pages Charts and Multiple Plots. --- Writerside/topics/charts.md | 7 +++++++ Writerside/topics/multiplot.md | 3 ++- Writerside/v.list | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index b06f9cc02..0befe38d9 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -10,6 +10,10 @@ Data in this format is sometimes referred to as tidy data, flat data, primary da You can pass tidy data to *Lets-Plot* in form of a Kotlin `Map`. +Examples: + +- [Preserving data–statistic bijection](%nb-stat_data_bijection%) + ## Aesthetics - Point shapes @@ -28,6 +32,7 @@ Examples: - [Line types](%nb-aesthetics-line_types%) - [System colors](%nb-aesthetics-system_colors%) - [Text](%nb-aesthetics-text_style%) +- [Overriding default grouping with the group aesthetic](%nb-group_override_defaults%) ## Basic Building Blocks @@ -68,6 +73,7 @@ Text: Examples: +- [Missing values: line, path, area, and ribbon](%nb-missing_values_line_path_area_ribbon%) - [Inset map of Kotlin island](%nb-spatialdataset_kotlin_isl%) - [Drawing graph edges](%nb-graph_edges%) - [Formatting labels on plots](%nb-formatting_axes_etc%) @@ -201,6 +207,7 @@ Examples: - [2d density](%nb-density_2d%) - [Hexagonal heatmap](%nb-geom_hex%) +- [Pointdensity geometry](%nb-geom_pointdensity%) - [Absolute unit specification for width and height aesthetics](%nb-param_width_unit%) diff --git a/Writerside/topics/multiplot.md b/Writerside/topics/multiplot.md index 50ad1b69e..30f7f9067 100644 --- a/Writerside/topics/multiplot.md +++ b/Writerside/topics/multiplot.md @@ -25,4 +25,5 @@ Examples: Examples: - [The `gggrid()` function](%nb-plot_grid%) -- [Sharing X,Y-axis scale limits](%nb-gggrid_scale_share%) \ No newline at end of file +- [Sharing X,Y-axis scale limits](%nb-gggrid_scale_share%) +- [Collecting guides in gggrid()](%nb-gggrid_legend_collect%) \ No newline at end of file diff --git a/Writerside/v.list b/Writerside/v.list index 6ff59f4b6..5e62e0edc 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -93,6 +93,7 @@ + @@ -101,8 +102,10 @@ + + @@ -119,6 +122,7 @@ + @@ -143,6 +147,7 @@ + From 40bba71b0f8d72db5eaa175eebb405b205229461 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 11 Nov 2025 18:17:59 +0100 Subject: [PATCH 04/18] Split examples on the pages Charts / Multiple Plots / Presentation Options to the 'Cookbooks' and 'Demos'. --- Writerside/topics/charts.md | 40 +++++++++++++---------- Writerside/topics/multiplot.md | 11 ++++--- Writerside/topics/presentation_options.md | 6 ++-- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index 0befe38d9..3c43b88ae 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -10,7 +10,7 @@ Data in this format is sometimes referred to as tidy data, flat data, primary da You can pass tidy data to *Lets-Plot* in form of a Kotlin `Map`. -Examples: +Cookbooks: - [Preserving data–statistic bijection](%nb-stat_data_bijection%) @@ -26,7 +26,7 @@ Examples: - Text -Examples: +Cookbooks: - [Point shapes](%nb-aesthetics-point_shapes%) - [Line types](%nb-aesthetics-line_types%) @@ -71,10 +71,9 @@ Text: [`label`](%api_geom%/geom-label/index.html), [`label repel`](%api_geom%/geom-label-repel/index.html) -Examples: +Cookbooks: - [Missing values: line, path, area, and ribbon](%nb-missing_values_line_path_area_ribbon%) -- [Inset map of Kotlin island](%nb-spatialdataset_kotlin_isl%) - [Drawing graph edges](%nb-graph_edges%) - [Formatting labels on plots](%nb-formatting_axes_etc%) - [Text geoms](%nb-text_geoms%) @@ -90,6 +89,10 @@ Examples: - [`stroke` aesthetic](%nb-aes_stroke%) - [Configuring nudge units in position adjustments](%nb-position_nudge_unit%) +Demos: + +- [Inset map of Kotlin island](%nb-spatialdataset_kotlin_isl%) + ## Discrete @@ -102,7 +105,7 @@ Examples: Learn more: Working with Categorical Variables and the asDiscrete() Function -Examples: +Cookbooks: - [Barchart](%nb-bar%) - [Pie-chart](%nb-geom_pie%) @@ -122,7 +125,7 @@ Examples: [`contours`](%api_geom%/geom-contour/index.html), [`filled contours`](%api_geom%/geom-contour-filled/index.html) -Examples: +Cookbooks: - [Contours](%nb-contours%) @@ -138,7 +141,7 @@ Examples: [`ridgeline`](%api_geom%/geom-area-ridges/index.html), [`frequency polygon`](%api_geom%/geom-freqpoly/index.html) -Examples: +Cookbooks: - [Distributions](%nb-distributions%) - [Dotplot geometry](%nb-geom_dotplot%) @@ -156,7 +159,7 @@ Examples: [`statSummary()`](%api_stat%/stat-summary/index.html), [`statSummaryBin()`](%api_stat%/stat-summary-bin/index.html) -Examples: +Cookbooks: - [ECDF stat](%nb-stat_ecdf%) - [Summary stat](%nb-stat_summary%) @@ -167,7 +170,7 @@ Examples: [`function`](%api_geom%/geom-function/index.html) -Examples: +Cookbooks: - [Function geometry](%nb-geom_function%) @@ -179,7 +182,7 @@ Examples: [`linerange`](%api_geom%/geom-line-range/index.html), [`pointrange`](%api_geom%/geom-point-range/index.html) -Examples: +Cookbooks: - [Plotting means and error ranges](%nb-error_bars%) - [Geometries with dual orientation](%nb-horizontal_geoms%) @@ -189,7 +192,7 @@ Examples: [`smoothing line`](%api_geom%/geom-smooth/index.html) -Examples: +Cookbooks: - [Smoothing](%nb-geom_smooth%) - [Draw a scatter plot](%nb-scatter_plot%) @@ -203,7 +206,7 @@ Examples: [`filled 2d density`](%api_geom%/geom-density2-d-filled/index.html), [`pointdensity`](%api_geom%/geom-point-density/index.html) -Examples: +Cookbooks: - [2d density](%nb-density_2d%) - [Hexagonal heatmap](%nb-geom_hex%) @@ -217,7 +220,7 @@ Examples: See also: [Joint Plot](bistro.md#joint-plot), [Residual Plot](bistro.md#residual-plot). -Examples: +Cookbooks: - [Marginal plots](%nb-marginal_layers%) @@ -254,10 +257,13 @@ This is in contrast to R's ggplot2, which provides separate "date", "time", and - `Date` -Examples: +Cookbooks: - [Scale time](%nb-scale_time%) - [Plotting time series](%nb-time_date_datetime%) + +Demos: + - [Bitcoin daily trend visualization](%nb-trading_chart%) @@ -265,7 +271,7 @@ Examples: [`geomImshow()`](%api_geom%/geom-imshow.html) -Examples: +Cookbooks: - [`geomImshow()`](%nb-image_101%) - [The `extent` parameter](%nb-image_extent%) @@ -281,7 +287,7 @@ Examples: [`coordFlip()`](%api_coord%/coord-flip.html), [`coordMap()`](%api_coord%/coord-map.html) -Examples: +Cookbooks: - [Flipped coordinates](%nb-coord_flip%) - [Polar coordinate system](%nb-coord_polar%) @@ -294,7 +300,7 @@ Examples: [`guides()`](%api_scale%/guides.html), [`layerKey()`](%api_scale%/layer-key.html) -Examples: +Cookbooks: - [Legend customization](%nb-legend%) - [Manual legend](%nb-manual_legend%) diff --git a/Writerside/topics/multiplot.md b/Writerside/topics/multiplot.md index 30f7f9067..c98bbb9d6 100644 --- a/Writerside/topics/multiplot.md +++ b/Writerside/topics/multiplot.md @@ -5,7 +5,7 @@ - [`facetGrid()`](%api_facet%/facet-grid.html) - split data by one or two variables that vary in the X and/or Y direction. - [`facetWrap()`](%api_facet%/facet-wrap.html) - split data by one or more variables with extra flexibility. -Examples: +Cookbooks: - [Multipanel plots with facets](%nb-facets%) @@ -13,16 +13,19 @@ Examples: - [`ggbunch`](%api_lets_plot%/ggbunch.html) - create a collection of plots that can have arbitrary location and size. -Examples: +Cookbooks: -- [Inset map of Kotlin island](%nb-spatialdataset_kotlin_isl%) - [The `ggbunch()` function](%nb-ggbunch%) +Demos: + +- [Inset map of Kotlin island](%nb-spatialdataset_kotlin_isl%) + ## `gggrid` - [`gggrid`](%api_lets_plot%/gggrid.html) - combines several plots on one figure, organized in a regular grid. -Examples: +Cookbooks: - [The `gggrid()` function](%nb-plot_grid%) - [Sharing X,Y-axis scale limits](%nb-gggrid_scale_share%) diff --git a/Writerside/topics/presentation_options.md b/Writerside/topics/presentation_options.md index 37b9e9347..06876035d 100644 --- a/Writerside/topics/presentation_options.md +++ b/Writerside/topics/presentation_options.md @@ -12,7 +12,7 @@ [`guideColorbar()`](%api_scale%/guide-colorbar.html), [`guides()`](%api_scale%/guides.html) -### Examples +### Cookbooks - [Themes overview](%nb-themes%) - [Default theme](%nb-default_theme%) @@ -45,7 +45,7 @@ All predefined themes -### Predefined Themes Examples +### Predefined Themes Cookbooks - [Default theme](%nb-default_theme%) - [Themes overview](%nb-themes%) @@ -69,7 +69,7 @@ Theme colors for geometries -### Flavors Examples +### Flavors Cookbooks - [Theme flavors](%nb-theme_flavors%) - [Themes overview](%nb-themes%) From f13cf55af4fe217bef1a80d475ff2182149a8347 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 11 Nov 2025 19:58:03 +0100 Subject: [PATCH 05/18] KDocs: Mention support of the "pointdensity" geom in the residualPlot(). --- .../org/jetbrains/letsPlot/bistro/residual/ResidualPlot.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/bistro/residual/ResidualPlot.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/bistro/residual/ResidualPlot.kt index 35a17cfe5..1b8fbca6f 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/bistro/residual/ResidualPlot.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/bistro/residual/ResidualPlot.kt @@ -33,7 +33,7 @@ package org.jetbrains.letsPlot.bistro.residual * @param seed Random seed for "loess" sampling. * @param maxN Maximum number of data-points for "loess" method. * If this quantity exceeded random sampling is applied to data. - * @param geom default = "point" ("point", "tile", "none"). + * @param geom default = "point" ("point", "tile", "pointdensity", "none"). * The geometric object to use to display the data. No object will be used if `geom="none"`. * @param bins Number or a Pair of Numbers. * Number of bins in both directions, vertical and horizontal. Overridden by `binWidth`. From 91759c624c084ef91045314c83b3f154ac1d2de1 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 11 Nov 2025 20:00:45 +0100 Subject: [PATCH 06/18] Update the library version in docs. --- Writerside/v.list | 2 +- docs/dokka/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Writerside/v.list b/Writerside/v.list index 5e62e0edc..66678b7b2 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -1,7 +1,7 @@ - + diff --git a/docs/dokka/build.gradle.kts b/docs/dokka/build.gradle.kts index 1cb844def..5652ff99a 100644 --- a/docs/dokka/build.gradle.kts +++ b/docs/dokka/build.gradle.kts @@ -10,7 +10,7 @@ plugins { id("org.jetbrains.dokka") } -val libVersion = "4.11.2" +val libVersion = "4.12.0" val rootDirectory = rootProject.projectDir.toString().replace("\\", "/") val docsDirectory = "$rootDirectory/docs" From b62b9b8ac303d7d68002c82339d1a6ca39ad0413 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 11 Nov 2025 20:06:23 +0100 Subject: [PATCH 07/18] Small fix in the 'Building Documentation with Dokka and Writerside' document. --- devdocs/DOKKA_AND_WRITERSIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devdocs/DOKKA_AND_WRITERSIDE.md b/devdocs/DOKKA_AND_WRITERSIDE.md index 76f2c2e29..80332bda3 100644 --- a/devdocs/DOKKA_AND_WRITERSIDE.md +++ b/devdocs/DOKKA_AND_WRITERSIDE.md @@ -24,7 +24,7 @@ Now the documentation site can be explored locally with the [http-server](https: ##### Update the [lets-plot-docs](https://github.com/JetBrains/lets-plot-docs) GitHub Repository. - Go to the docs/kotlin/ directory of the [lets-plot-docs](https://github.com/JetBrains/lets-plot-docs) repository. - Remove everything except -lets--plot--kotlin/. + Remove everything **except** -lets--plot--kotlin/ and examples/. Then move the contents of the docs/build/ directory there. - Go to the root of the [lets-plot-docs](https://github.com/JetBrains/lets-plot-docs) repository From 437a774f76d7721ae1f94857a931e50d897525ec Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Wed, 12 Nov 2025 18:28:23 +0100 Subject: [PATCH 08/18] Another small fix in the 'Building Documentation with Dokka and Writerside' document. --- devdocs/DOKKA_AND_WRITERSIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devdocs/DOKKA_AND_WRITERSIDE.md b/devdocs/DOKKA_AND_WRITERSIDE.md index 80332bda3..c856b7103 100644 --- a/devdocs/DOKKA_AND_WRITERSIDE.md +++ b/devdocs/DOKKA_AND_WRITERSIDE.md @@ -24,7 +24,7 @@ Now the documentation site can be explored locally with the [http-server](https: ##### Update the [lets-plot-docs](https://github.com/JetBrains/lets-plot-docs) GitHub Repository. - Go to the docs/kotlin/ directory of the [lets-plot-docs](https://github.com/JetBrains/lets-plot-docs) repository. - Remove everything **except** -lets--plot--kotlin/ and examples/. + Remove everything **except** -lets--plot--kotlin/, examples/ and releases/. Then move the contents of the docs/build/ directory there. - Go to the root of the [lets-plot-docs](https://github.com/JetBrains/lets-plot-docs) repository From bd6142cb77026875f3cb33a79e4152f3ace0c1c4 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Wed, 12 Nov 2025 18:36:16 +0100 Subject: [PATCH 09/18] Update links to the new cookbooks. --- Writerside/v.list | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Writerside/v.list b/Writerside/v.list index 66678b7b2..f0caba806 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -28,6 +28,7 @@ + @@ -93,7 +94,7 @@ - + @@ -102,10 +103,10 @@ - + - + @@ -122,7 +123,7 @@ - + @@ -147,7 +148,7 @@ - + From 69411492895a5a0b6a006ccfe26b7f418ba27e5b Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 14 Nov 2025 16:53:08 +0100 Subject: [PATCH 10/18] Fix links to the release notebooks. --- Writerside/v.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Writerside/v.list b/Writerside/v.list index f0caba806..61b756b78 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -28,7 +28,7 @@ - + From 31c1e723cb9823ddb4586156d0cbee1f27702e78 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 14 Nov 2025 17:28:05 +0100 Subject: [PATCH 11/18] Remove the stat_data_bijection example from the Charts page. --- Writerside/topics/charts.md | 4 ---- Writerside/v.list | 1 - 2 files changed, 5 deletions(-) diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index 3c43b88ae..9024bc298 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -10,10 +10,6 @@ Data in this format is sometimes referred to as tidy data, flat data, primary da You can pass tidy data to *Lets-Plot* in form of a Kotlin `Map`. -Cookbooks: - -- [Preserving data–statistic bijection](%nb-stat_data_bijection%) - ## Aesthetics - Point shapes diff --git a/Writerside/v.list b/Writerside/v.list index 61b756b78..99b80d92c 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -148,7 +148,6 @@ - From 6cae0e923f68981e5fa51c016f59525e8fd7b564 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Mon, 1 Dec 2025 18:39:09 +0100 Subject: [PATCH 12/18] KDocs: new descriptions for the scaleXxxIdentity() and elementXxx() functions; small fixes in geomPointDensity() and geomXxxRepel(). --- .../letsPlot/geom/geom_label_repel.kt | 2 + .../letsPlot/geom/geom_pointdensity.kt | 2 +- .../letsPlot/geom/geom_text_repel.kt | 2 + .../org/jetbrains/letsPlot/scale/Identity.kt | 45 ++++++++----------- .../org/jetbrains/letsPlot/themes/theme.kt | 17 +++---- 5 files changed, 29 insertions(+), 39 deletions(-) diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label_repel.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label_repel.kt index df9cff073..3507dcbcd 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label_repel.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label_repel.kt @@ -126,6 +126,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * Maximum number of iterations used to resolve collisions. * @param maxTime default = 5. * Maximum allowed time in seconds for resolving label collisions. + * Set to -1 to disable the time limit. * @param direction default = "both" ("both", "x", "y"). * Direction in which text labels can be moved. * @param pointPadding Padding around data points to prevent overlap with text labels. @@ -133,6 +134,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * @param maxOverlaps default = 10. * The maximum number of overlapping text labels allowed. * Additional text labels will be hidden. + * Set to -1 to disable overlap filtering. * @param minSegmentLength Minimum length of the line connecting the label to the point. * Shorter segments will be omitted. * @param arrow Specification for arrow head, as created by `arrow()` function. diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pointdensity.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pointdensity.kt index 5d7e25d64..abd78ebc5 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pointdensity.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pointdensity.kt @@ -19,7 +19,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions @Suppress("ClassName") /** - * Plots data points and colors each point by the local density of nearby points. + * Plot data points and color each point by the local density of nearby points. * * ## Notes * diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text_repel.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text_repel.kt index d0699d5a0..1e0b3e508 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text_repel.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text_repel.kt @@ -114,6 +114,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * Maximum number of iterations used to resolve collisions. * @param maxTime default = 5. * Maximum allowed time in seconds for resolving label collisions. + * Set to -1 to disable the time limit. * @param direction default = "both" ("both", "x", "y"). * Direction in which text labels can be moved. * @param pointPadding Padding around data points to prevent overlap with text labels. @@ -121,6 +122,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * @param maxOverlaps default = 10. * The maximum number of overlapping text labels allowed. * Additional text labels will be hidden. + * Set to -1 to disable overlap filtering. * @param minSegmentLength Minimum length of the line connecting the label to the point. * Shorter segments will be omitted. * @param arrow Specification for arrow head, as created by `arrow()` function. diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/scale/Identity.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/scale/Identity.kt index b0b97e87c..6bc0f667f 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/scale/Identity.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/scale/Identity.kt @@ -11,9 +11,8 @@ import org.jetbrains.letsPlot.intern.Options import org.jetbrains.letsPlot.intern.Scale /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity scale that maps already-scaled data directly to aesthetic values, without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: List of Strings containing * - names of colors (i.e., "green") @@ -75,9 +74,8 @@ fun scaleIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity color scale that maps already-scaled data directly to the color aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: List of Strings containing * - names of colors (i.e., "green") @@ -132,9 +130,8 @@ fun scaleColorIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity fill scale that maps already-scaled data directly to the fill aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: List of Strings containing * - names of colors (i.e., "green") @@ -189,9 +186,8 @@ fun scaleFillIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity shape scale that maps already-scaled data directly to the shape aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: Numeric codes of shapes. * @@ -246,9 +242,8 @@ fun scaleShapeIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity linetype scale that maps already-scaled data directly to the linetype aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: Numeric codes or names of line types (i.e "dotdash"). * The codes are: 0 = "blank", 1 = "solid", 2 = "dashed", 3 = "dotted", 4 = "dotdash", 5 = "longdash", 6 = "twodash". @@ -305,9 +300,8 @@ fun scaleLinetypeIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity alpha scale that maps already-scaled data directly to the alpha aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: Numeric values in range `[0..1]`. * @@ -356,9 +350,8 @@ fun scaleAlphaIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can handle directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity size scale that maps already-scaled data directly to the size aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: positive Numeric values. * @@ -407,9 +400,8 @@ fun scaleSizeIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can be handled directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity linewidth scale that maps already-scaled data directly to the linewidth aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: positive Numeric values. * @@ -459,9 +451,8 @@ fun scaleLinewidthIdentity( ) /** - * Use this scale when your data has already been scaled. - * I.e. it already represents aesthetic values that can be handled directly. - * This will not produce a legend unless you also supply the breaks and labels. + * Identity stroke scale that maps already-scaled data directly to the stroke aesthetic without transformation. + * This scale does not produce a legend unless breaks and labels are supplied. * * Input data expected: positive Numeric values. * diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/theme.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/theme.kt index 233f33a44..f70433e12 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/theme.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/theme.kt @@ -527,8 +527,7 @@ class theme( } /** - * Specify how non-data components of the plot are drawn. - * This theme element draws nothing, and assigns no space. + * Theme element that draws nothing and allocates no space for non-data components of the plot. * * ## Examples * @@ -538,8 +537,7 @@ fun elementBlank() = mapOf(Option.Theme.Elem.BLANK to true) /** - * Specify how non-data components of the plot are drawn. - * This theme element draws borders and backgrounds. + * Theme element that draws rectangular non-data components of the plot: borders and backgrounds. * * ## Examples * @@ -570,8 +568,7 @@ fun elementRect( /** - * Specify how non-data components of the plot are drawn. - * This theme element draws lines. + * Theme element that draws line-based non-data components of the plot. * * ## Examples * @@ -599,8 +596,7 @@ fun elementLine( /** - * Specify how non-data components of the plot are drawn. - * This theme element draws text. + * Theme element that draws text for non-data components of the plot. * * ## Examples * @@ -657,8 +653,7 @@ fun elementText( /** - * Specify how non-data components of the plot are drawn. - * This theme element draws text with Markdown support. + * Theme element that draws text with Markdown support for non-data components of the plot. * * Supported features: * @@ -731,7 +726,7 @@ fun margin(t: Any? = null, r: Any? = null, b: Any? = null, l: Any? = null) = lis /** - * Specify custom values for named geom colors used in plot elements. + * Theme element that specifies custom values for named geom colors used in plot elements. * * ## Examples * From 3a16263df6cc3d9162a85470833b76e549a769ce Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 2 Dec 2025 14:49:56 +0100 Subject: [PATCH 13/18] Remove extra link from the KDocs of the geomErrorBar(). --- .../kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt index c829f9cc7..c1ff54796 100755 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt @@ -29,8 +29,6 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * * - [error_bars.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/error_bars.ipynb) * - * - [horizontal_error_bars.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/horizontal_error_bars.ipynb) - * * - [horizontal_geoms.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/horizontal_geoms.ipynb) * * @param data The data to be displayed in this layer. If null, the default, the data From d9bccc58a52e810594c62accf1d2e89ac99b746a Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Wed, 3 Dec 2025 11:56:14 +0100 Subject: [PATCH 14/18] Update links to the new cookbooks. --- Writerside/v.list | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Writerside/v.list b/Writerside/v.list index 99b80d92c..9b0bb075d 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -28,7 +28,6 @@ - @@ -94,7 +93,7 @@ - + @@ -103,10 +102,10 @@ - + - + @@ -123,7 +122,7 @@ - + From bb9aa81d7651b2489b99d3c674a5d252fcb6946a Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Wed, 3 Dec 2025 11:58:56 +0100 Subject: [PATCH 15/18] Rebuild the html versions of the new notebooks (for the v4.12.0). --- .../f-4.12.0/axis_tick_direction.html | 18805 +++-- .../f-4.12.0/flavor_standard.html | 18757 +++-- .../f-4.12.0/geom_histogram_param_breaks.html | 18976 ++++-- .../f-4.12.0/geom_pointdensity.html | 56840 ++++------------ .../f-4.12.0/gggrid_legend_collect.html | 45838 ++++--------- .../f-4.12.0/ggtb_size_zoomin.html | 18763 +++-- .../f-4.12.0/group_override_defaults.html | 22296 +++--- .../f-4.12.0/legend_justification.html | 18944 +++-- .../f-4.12.0/legend_wrap.html | 18799 +++-- .../missing_values_line_path_area_ribbon.html | 19066 ++++-- .../f-4.12.0/stat_data_bijection.html | 18967 ++++-- 11 files changed, 136472 insertions(+), 139579 deletions(-) diff --git a/docs/examples/jupyter-notebooks/f-4.12.0/axis_tick_direction.html b/docs/examples/jupyter-notebooks/f-4.12.0/axis_tick_direction.html index bbe6e76a2..98d55754d 100644 --- a/docs/examples/jupyter-notebooks/f-4.12.0/axis_tick_direction.html +++ b/docs/examples/jupyter-notebooks/f-4.12.0/axis_tick_direction.html @@ -3,7291 +3,13048 @@ -axis_tick_direction +axis_tick_direction - - + @@ -7312,6 +13069,7 @@ processEnvironments: true }, displayAlign: 'center', + messageStyle: 'none', CommonHTML: { linebreaks: { automatic: true @@ -7324,210 +13082,23 @@ } init_mathjax(); - - - - + +
-