diff --git a/Writerside/images/changelog/4.12.0/geom_pointdensity.png b/Writerside/images/changelog/4.12.0/geom_pointdensity.png new file mode 100644 index 000000000..28279b6f1 Binary files /dev/null and b/Writerside/images/changelog/4.12.0/geom_pointdensity.png differ diff --git a/Writerside/images/changelog/4.12.0/gggrid_legend_collect.png b/Writerside/images/changelog/4.12.0/gggrid_legend_collect.png new file mode 100644 index 000000000..01dace80e Binary files /dev/null and b/Writerside/images/changelog/4.12.0/gggrid_legend_collect.png differ diff --git a/Writerside/images/changelog/4.12.0/group_override_defaults.png b/Writerside/images/changelog/4.12.0/group_override_defaults.png new file mode 100644 index 000000000..33172a6f4 Binary files /dev/null and b/Writerside/images/changelog/4.12.0/group_override_defaults.png differ diff --git a/Writerside/images/changelog/4.12.0/missing_values_ribbon.png b/Writerside/images/changelog/4.12.0/missing_values_ribbon.png new file mode 100644 index 000000000..933f9aa01 Binary files /dev/null and b/Writerside/images/changelog/4.12.0/missing_values_ribbon.png differ 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..9024bc298 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -22,6 +22,14 @@ You can pass tidy data to *Lets-Plot* in form of a Kotlin `Map`. - Text +Cookbooks: + +- [Point shapes](%nb-aesthetics-point_shapes%) +- [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 Points: @@ -59,9 +67,9 @@ Text: [`label`](%api_geom%/geom-label/index.html), [`label repel`](%api_geom%/geom-label-repel/index.html) -Examples: +Cookbooks: -- [Inset map of Kotlin island](%nb-spatialdataset_kotlin_isl%) +- [Missing values: line, path, area, and ribbon](%nb-missing_values_line_path_area_ribbon%) - [Drawing graph edges](%nb-graph_edges%) - [Formatting labels on plots](%nb-formatting_axes_etc%) - [Text geoms](%nb-text_geoms%) @@ -77,6 +85,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 @@ -89,7 +101,7 @@ Examples: Learn more: Working with Categorical Variables and the asDiscrete() Function -Examples: +Cookbooks: - [Barchart](%nb-bar%) - [Pie-chart](%nb-geom_pie%) @@ -109,7 +121,7 @@ Examples: [`contours`](%api_geom%/geom-contour/index.html), [`filled contours`](%api_geom%/geom-contour-filled/index.html) -Examples: +Cookbooks: - [Contours](%nb-contours%) @@ -125,7 +137,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%) @@ -143,7 +155,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%) @@ -154,7 +166,7 @@ Examples: [`function`](%api_geom%/geom-function/index.html) -Examples: +Cookbooks: - [Function geometry](%nb-geom_function%) @@ -166,7 +178,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%) @@ -176,7 +188,7 @@ Examples: [`smoothing line`](%api_geom%/geom-smooth/index.html) -Examples: +Cookbooks: - [Smoothing](%nb-geom_smooth%) - [Draw a scatter plot](%nb-scatter_plot%) @@ -187,12 +199,14 @@ 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: +Cookbooks: - [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%) @@ -202,7 +216,7 @@ Examples: See also: [Joint Plot](bistro.md#joint-plot), [Residual Plot](bistro.md#residual-plot). -Examples: +Cookbooks: - [Marginal plots](%nb-marginal_layers%) @@ -239,10 +253,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%) @@ -250,7 +267,7 @@ Examples: [`geomImshow()`](%api_geom%/geom-imshow.html) -Examples: +Cookbooks: - [`geomImshow()`](%nb-image_101%) - [The `extent` parameter](%nb-image_extent%) @@ -266,7 +283,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%) @@ -279,7 +296,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/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/multiplot.md b/Writerside/topics/multiplot.md index 50ad1b69e..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,20 @@ 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%) \ 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/topics/presentation_options.md b/Writerside/topics/presentation_options.md index a82238f1a..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%) @@ -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), @@ -45,7 +45,7 @@ All predefined themes -### Predefined Themes Examples +### Predefined Themes Cookbooks - [Default theme](%nb-default_theme%) - [Themes overview](%nb-themes%) @@ -62,13 +62,14 @@ [`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 -### Flavors Examples +### Flavors Cookbooks - [Theme flavors](%nb-theme_flavors%) - [Themes overview](%nb-themes%) diff --git a/Writerside/topics/whats_new.md b/Writerside/topics/whats_new.md index effe4267d..80c93b879 100644 --- a/Writerside/topics/whats_new.md +++ b/Writerside/topics/whats_new.md @@ -1,73 +1,59 @@ -# What Is New in 4.11.0 +# What Is New in 4.12.0 -- **Time Series Plotting** +- **`geomPointDensity()` Geometry** - - Support temporal data types from `kotlinx.datetime`, `java.time`, and `java.util`. + changelog/4.12.0/geom_pointdensity.png - - Support for timezone-aware `java.time.ZonedDateTime` and `java.time.OffsetDateTime` objects. + See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/geom_pointdensity.html). - changelog/4.11.0/time_date_datetime.png +- **Explicit `group` aesthetic now overrides default grouping behavior instead of combining with it** - See [Date-time](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/time_date_datetime.ipynb) cookbook. -

+ > [!IMPORTANT] + > **BREAKING CHANGE:** + > + > Previously, setting `group='variable'` would group by both the explicit variable AND any discrete + > aesthetics (color, shape, etc.). \ + > Now it groups ONLY by the explicit variable, matching `ggplot2` behavior. \ + > Use `group=[var1, var2, ...]` to group by multiple variables explicitly, \ + > and `group=[]` to disable any grouping. - changelog/4.11.0/bitcoin_trading.png + changelog/4.12.0/group_override_defaults.png - See [Bitcoin trading](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/demo/trading_chart.ipynb) demo. -

+ See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/group_override_defaults.html). -- **`geomSina()` Geometry** +- **`gggrid()`: support for shared legends (parameter `guides`)** - changelog/4.11.0/geom_sina.png + changelog/4.12.0/group_override_defaults.png - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/geom_sina.ipynb). + See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/gggrid_legend_collect.html). -- **`geomTextRepel()` and `geomLabelRepel()` Geometries** +- **Better handling of missing values in `geomLine()`, `geomPath()`, `geomRibbon()`, and `geomArea()`** - changelog/4.11.0/geom_repel.png + changelog/4.12.0/missing_values_ribbon.png - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/ggrepel.ipynb). + See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/missing_values_line_path_area_ribbon.html). -- **`waterfallPlot()` Chart** +- **`geomHistogram()`: custom bin bounds (parameter `breaks`)** - - Annotations support via `relativeLabels` and `absoluteLabels` parameters. -

+ See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/geom_histogram_param_breaks.html). - changelog/4.11.0/waterfall_plot_annotations.png +- **Legend automatically wraps to prevent overlap — up to 15 rows for vertical legends and 5 columns for horizontal ones** - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/waterfall_plot_annotations.ipynb). -

+ See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/legend_wrap.html). - - Support for combining waterfall bars with other geometry layers. -

+- **`flavorStandard()` resets the theme's default color scheme** - changelog/4.11.0/waterfall_plot_layers.png + Use to override other flavors or make defaults explicit. - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/waterfall_plot_layers.ipynb). + See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/flavor_standard.html). -- **Continuous Data on Discrete Scales** +- **`theme` methods controlling legend justification: `legendJustificationTop()`, `legendJustificationRight()`, `legendJustificationBottom()`, and `legendJustificationLeft()`** - Continuous data when used with discrete positional scales is no longer transformed to discrete data.
- Instead, it remains continuous, allowing for precise positioning of continuous elements relative to discrete ones. -

+ See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/legend_justification.html). - changelog/4.11.0/combo_discrete_continuous.png +- **`ggtb()`: Added `sizeZoomin` and `sizeBasis` parameters to control point size scaling behavior when zooming (works with `geomPoint` and related layers).** - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.11.0/numeric_data_on_discrete_scale.ipynb). - - > [!TIP] - > New way of handling continuous data on discrete scales could potentially break existing plots. - > If you want to restore a broken plot to its original form, you can use the [`asDiscrete()`](https://lets-plot.org/kotlin/as-discrete.html) function to annotate continuous data as discrete. - -- **Plot Layout** - - The default plot layout has been improved to better accommodate axis labels and titles.
- Also, new `theme()` options `axisTextSpacing`, `axisTextSpacingX`, and `axisTextSpacingY` control spacing between axis ticks and labels. -

- - changelog/4.11.0/plot_layout_diagram.png - - See new [Plot Layout Diagrams](https://lets-plot.org/kotlin/presentation-options.html#plot-layout-diagrams) showing various layout options and their effects on plot appearance. + See: [example notebook](https://raw.githack.com/JetBrains/lets-plot-kotlin/refs/heads/master/docs/examples/jupyter-notebooks/f-4.12.0/ggtb_size_zoomin.html). - **And More** diff --git a/Writerside/v.list b/Writerside/v.list index a08d6878b..9b0bb075d 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -1,7 +1,7 @@ - + @@ -27,6 +27,7 @@ + @@ -52,6 +53,14 @@ + + + + + + + + @@ -84,6 +93,7 @@ + @@ -92,8 +102,10 @@ + + @@ -110,6 +122,7 @@ + diff --git a/devdocs/DOKKA_AND_WRITERSIDE.md b/devdocs/DOKKA_AND_WRITERSIDE.md index 76f2c2e29..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/. + 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 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" 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(); - - - - + +
-