Axis Tick Direction¶
If the axisTicksLength, axisTicksLengthX, or axisTicksLengthY parameter in theme is set to a negative value, the ticks are drawn inward, pointing toward the plot area.
%useLatestDescriptors
%use dataframe
%use lets-plot
@@ -7535,15 +13106,11 @@ Axis Tick Direction
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-In [2]:
-
-
+
+
+In [2]:
+
+
LetsPlot.getInfo()
+
+
+
+Out[2]:
+
-
-
-
-
-
-Out[2]:
-
-Lets-Plot Kotlin API v.0.0.0-SNAPSHOT. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.8.0.
-
-
-
-
-
-In [3]:
-
-
+
+
+In [3]:
+
+
import org.jetbrains.kotlinx.dataframe.api.*
import kotlinx.datetime.LocalDate
@@ -7872,14 +13427,11 @@ Axis Tick Direction
-
-
-
-
-In [4]:
-
-
+
+
+In [4]:
+
+
val pDt = letsPlot(econ2000) { x = "date"; y = "unemploy" } +
geomLine() +
themeClassic() +
@@ -7891,15 +13443,11 @@ Axis Tick Direction
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-Out[4]:
-
-
+
+Out[4]:
+
+
-
-
-
-
-In [5]:
-
-
+
+
+In [5]:
+
+
// To make the ticks more visible while keeping a compact layout, direct them inward
pDt + theme(axisTicksLength = -8) + ggtitle("Ticks directed inward")
@@ -8412,15 +13955,11 @@ Axis Tick Direction
-
-
-
-
-Out[5]:
-
-
+
+
+
+Out[5]:
+
-
-
-
-
-
-In [6]:
-
-
+
+
+In [6]:
+
+
// Control the tick length separately for each axis
pDt + theme(
@@ -8909,15 +14445,11 @@ Axis Tick Direction
-
-
-
-
-Out[6]:
-
-
+
+
+
+Out[6]:
+
+
diff --git a/docs/examples/jupyter-notebooks/f-4.12.0/flavor_standard.html b/docs/examples/jupyter-notebooks/f-4.12.0/flavor_standard.html
index 96901f888..b72328a82 100644
--- a/docs/examples/jupyter-notebooks/f-4.12.0/flavor_standard.html
+++ b/docs/examples/jupyter-notebooks/f-4.12.0/flavor_standard.html
@@ -3,7291 +3,13048 @@
-flavor_standard
+flavor_standard
-
-
+
@@ -7312,6 +13069,7 @@
processEnvironments: true
},
displayAlign: 'center',
+ messageStyle: 'none',
CommonHTML: {
linebreaks: {
automatic: true
@@ -7324,210 +13082,23 @@
}
init_mathjax();
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
Returning to the Theme Defaults with flavorStandard()¶
Use flavorStandard() to override other flavors or to make defaults explicit.
-
-
-
-
-
-In [1]:
-
-
+
+
+In [1]:
+
+
%useLatestDescriptors
%use dataframe
%use lets-plot
@@ -7535,15 +13106,11 @@ Returning to the
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-In [2]:
-
-
+
+
+In [2]:
+
+
LetsPlot.getInfo()
+
+
+
+Out[2]:
+
-
-
-
-
-
-Out[2]:
-
-Lets-Plot Kotlin API v.0.0.0-SNAPSHOT. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.8.0.
-
-
-
-
-
-In [3]:
-
-
+
+
+In [3]:
+
+
// Set a reusable style layer for consistent plots across the project.
LetsPlot.theme = themeClassic() +
@@ -7875,14 +13430,11 @@ Returning to the
-
-
-
-
-
-In [4]:
-
-
+
+
+In [4]:
+
+
val df = DataFrame.readCSV("https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg.csv")
val mpg = df.toMap()
@@ -7890,14 +13442,11 @@ Returning to the
-
-
-
-
-
-In [5]:
-
-
+
+
+In [5]:
+
+
// A base plot with the common project style
val p = letsPlot(mpg) { x = "cty"; y = "hwy"; color = "drv" } +
@@ -7909,15 +13458,11 @@ Returning to the
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-Out[5]:
-
-
+
+Out[5]:
+
-
-
-
-
-
-In [6]:
-
-
+
+
+In [6]:
+
+
// To restore the theme defaults without affecting other settings, apply flavor_standard().
// This can be useful, for example, when exporting the plot for printing.
//
@@ -8788,15 +14322,11 @@ Returning to the
-
-
-
-
-
-
-Out[6]:
-
-
+
+
+
+Out[6]:
+
+
diff --git a/docs/examples/jupyter-notebooks/f-4.12.0/geom_histogram_param_breaks.html b/docs/examples/jupyter-notebooks/f-4.12.0/geom_histogram_param_breaks.html
index f7fcffaa9..5e66e6b18 100644
--- a/docs/examples/jupyter-notebooks/f-4.12.0/geom_histogram_param_breaks.html
+++ b/docs/examples/jupyter-notebooks/f-4.12.0/geom_histogram_param_breaks.html
@@ -3,7291 +3,13048 @@
-geom_histogram_param_breaks
+geom_histogram_param_breaks
-
-
+
@@ -7312,6 +13069,7 @@
processEnvironments: true
},
displayAlign: 'center',
+ messageStyle: 'none',
CommonHTML: {
linebreaks: {
automatic: true
@@ -7324,226 +13082,35 @@
}
init_mathjax();
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
Custom Histogram Bins Using the breaks Parameter¶
-
-
-
-
-
-In [1]:
-
-
+
+
+In [1]:
+
+
%useLatestDescriptors
%use dataframe
-%use lets-plot
+%use lets-plot(output="js, svg")
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-In [2]:
-
-
+
+
+In [2]:
+
+
LetsPlot.getInfo()
-
-
-
-
-
-
-Out[2]:
-
-Lets-Plot Kotlin API v.0.0.0-SNAPSHOT. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.8.0.
+
+
+
+Out[2]:
+
-
-
-
-
-In [3]:
-
-
+
+
+In [3]:
+
+
val url = "https://raw.githubusercontent.com/JetBrains/lets-plot-docs/refs/heads/master/data/diamonds.csv"
val df = DataFrame.readCSV(url)
val data = df.toMap()
@@ -7867,22 +13422,18 @@ Custom Histogram Bins
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-Out[3]:
-
-
+
+Out[3]:
+
+
-
-
-
-
-
-
+
+
+
Default Bins¶
-
-
-
-
-
-In [4]:
-
-
+
+
+In [4]:
+
+
letsPlot(data) { x = "price" } +
geomHistogram(color = "black", fill = "gray80")
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-Out[4]:
-
-
+
+Out[4]:
+
+
-
-
-
-
-
-
+
+
+
Equi-probable Bins¶
-
-
-
-
-
-In [5]:
-
-
+
+
+In [5]:
+
+
val prices = data["price"]
?.filterIsInstance<Number>()
?.map(Number::toDouble)
@@ -8850,15 +14380,11 @@ Equi-probable Bins
-
-
-
-
-Out[5]:
-
-
+
+
+
+Out[5]:
+
-
+
-
-
-
-
-
+
+
+
Identity Stat¶
-
-
-
-
-
-In [6]:
-
-
+
+
+In [6]:
+
+
-
-
-
-
-
-
-Out[6]:
-
-
+
+
+
+Out[6]:
+
-
-
-
-
-
-In [7]:
-
-
+
+
+In [7]:
+
-
-
-
-
-
-Out[7]:
-
-
+
+
+
+Out[7]:
+
+
diff --git a/docs/examples/jupyter-notebooks/f-4.12.0/geom_pointdensity.html b/docs/examples/jupyter-notebooks/f-4.12.0/geom_pointdensity.html
index c050570b9..80cfe2fe8 100644
--- a/docs/examples/jupyter-notebooks/f-4.12.0/geom_pointdensity.html
+++ b/docs/examples/jupyter-notebooks/f-4.12.0/geom_pointdensity.html
@@ -3,7291 +3,13048 @@
-geom_pointdensity
+geom_pointdensity
-
-
+
@@ -7312,6 +13069,7 @@
processEnvironments: true
},
displayAlign: 'center',
+ messageStyle: 'none',
CommonHTML: {
linebreaks: {
automatic: true
@@ -7324,226 +13082,35 @@
}
init_mathjax();
-
-
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
geomPointDensity()¶
geomPointDensity() is like geomPoint(), but smarter in crowded spots. It plots each data point, and also colors that point based on how many other points are packed around it. Dense clusters get one color, sparse areas get another. So instead of just a scatterplot, you get a built-in heatmap of local point density, without needing a separate 2D density layer.
-
-
-
-
-
-In [1]:
-
-
+
+
+In [1]:
+
+
%useLatestDescriptors
%use dataframe
-%use lets-plot
+%use lets-plot(output="js,png")
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-In [2]:
-
-
+
+
+In [2]:
+
+
LetsPlot.getInfo()
+
+
+
+Out[2]:
+
-
-
-
-
-Out[2]:
-
-Lets-Plot Kotlin API v.0.0.0-SNAPSHOT. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.8.0.
-
-
-
-
-
-
-
-### 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)
-### 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`.
+
- - 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).
-
+- **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.
-
+
- 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://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()`**
-
+
- 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.
-
+- **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).
-
+ 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.
+- **`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.
-
- 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 @@