diff --git a/docs/images/samples/area/area_fixed.svg b/docs/images/samples/area/area_fixed.svg
index 7bea7c73f..c99002ddf 100644
--- a/docs/images/samples/area/area_fixed.svg
+++ b/docs/images/samples/area/area_fixed.svg
@@ -384,12 +384,12 @@ font-size: 13.0px;
- Month
+ Water Level (meters)
- Water Level (meters)
+ Month
diff --git a/docs/images/samples/area/area_fixed_dark.svg b/docs/images/samples/area/area_fixed_dark.svg
index 14ee6ddef..d0607d3c0 100644
--- a/docs/images/samples/area/area_fixed_dark.svg
+++ b/docs/images/samples/area/area_fixed_dark.svg
@@ -384,12 +384,12 @@ font-size: 13.0px;
- Month
+ Water Level (meters)
- Water Level (meters)
+ Month
diff --git a/docs/images/samples/bars/bar_settings.svg b/docs/images/samples/bars/bar_settings.svg
index c86626b0e..9173b8412 100644
--- a/docs/images/samples/bars/bar_settings.svg
+++ b/docs/images/samples/bars/bar_settings.svg
@@ -134,82 +134,74 @@ font-size: 13.0px;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -218,7 +210,7 @@ font-size: 13.0px;
-
+
@@ -227,7 +219,7 @@ font-size: 13.0px;
-
+
@@ -236,7 +228,7 @@ font-size: 13.0px;
-
+
@@ -245,7 +237,7 @@ font-size: 13.0px;
-
+
@@ -254,7 +246,7 @@ font-size: 13.0px;
-
+
@@ -263,7 +255,7 @@ font-size: 13.0px;
-
+
@@ -272,10 +264,10 @@ font-size: 13.0px;
-
+
-
+
@@ -283,80 +275,52 @@ font-size: 13.0px;
-
+
10
-
+
20
-
+
30
-
+
40
-
+
50
-
+
60
-
-
-
- 70
-
-
-
-
-
-
- 80
-
-
-
-
-
-
- 90
-
-
-
-
-
-
- 100
-
-
-
-
+
Sugar content
@@ -366,7 +330,7 @@ font-size: 13.0px;
Sugar Content (g per 100g)
-
+
Candy Name
diff --git a/docs/images/samples/bars/bar_settings_dark.svg b/docs/images/samples/bars/bar_settings_dark.svg
index d95b60063..add5df7c1 100644
--- a/docs/images/samples/bars/bar_settings_dark.svg
+++ b/docs/images/samples/bars/bar_settings_dark.svg
@@ -134,52 +134,44 @@ font-size: 13.0px;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -188,7 +180,7 @@ font-size: 13.0px;
-
+
@@ -197,7 +189,7 @@ font-size: 13.0px;
-
+
@@ -206,7 +198,7 @@ font-size: 13.0px;
-
+
@@ -215,7 +207,7 @@ font-size: 13.0px;
-
+
@@ -224,7 +216,7 @@ font-size: 13.0px;
-
+
@@ -233,7 +225,7 @@ font-size: 13.0px;
-
+
@@ -242,10 +234,10 @@ font-size: 13.0px;
-
+
-
+
@@ -253,102 +245,74 @@ font-size: 13.0px;
-
+
10
-
+
20
-
+
30
-
+
40
-
+
50
-
+
60
-
-
-
- 70
-
-
-
-
-
-
- 80
-
-
-
-
-
-
- 90
-
-
-
-
-
-
- 100
-
-
-
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -356,7 +320,7 @@ font-size: 13.0px;
-
+
Sugar content
@@ -366,7 +330,7 @@ font-size: 13.0px;
Sugar Content (g per 100g)
-
+
Candy Name
diff --git a/docs/topics/guides/ErrorBars-Guide.md b/docs/topics/guides/ErrorBars-Guide.md
index c98f31c55..bd798652a 100644
--- a/docs/topics/guides/ErrorBars-Guide.md
+++ b/docs/topics/guides/ErrorBars-Guide.md
@@ -187,11 +187,12 @@ plot(dataset) {
position = posD
}
+ x.axis.name = "Dose (mg)"
+ y.axis.name = "Tooth length (mm)"
+
layout {
title = "The Effect of Vitamin C on Tooth Growth in Guinea Pigs"
size = 700 to 400
- xAxisLabel = "Dose (mg)"
- yAxisLabel = "Tooth length (mm)"
style {
legend {
@@ -235,11 +236,11 @@ plot(dataset) {
}
}
+ x.axis.name = "Dose (mg)"
+ y.axis.name = "Tooth length (mm)"
layout {
size = 700 to 400
- xAxisLabel = "Dose (mg)"
- yAxisLabel = "Tooth length (mm)"
style {
legend {
@@ -273,11 +274,10 @@ plot(dataset) {
position = Position.dodge(0.95)
}
- layout {
- size = 700 to 400
- xAxisLabel = "Dose (mg)"
- yAxisLabel = "Tooth length (mm)"
- }
+ x.axis.name = "Dose (mg)"
+ y.axis.name = "Tooth length (mm)"
+
+ layout.size = 700 to 400
}
```
@@ -308,11 +308,10 @@ plot(dataset) {
position = posD
}
- layout {
- size = 700 to 400
- xAxisLabel = "Dose (mg)"
- yAxisLabel = "Tooth length (mm)"
- }
+ x.axis.name = "Dose (mg)"
+ y.axis.name = "Tooth length (mm)"
+
+ layout.size = 700 to 400
}
```
@@ -344,11 +343,10 @@ plot(dataset) {
position = posD
}
- layout {
- size = 700 to 400
- xAxisLabel = "Dose (mg)"
- yAxisLabel = "Tooth length (mm)"
- }
+ x.axis.name = "Dose (mg)"
+ y.axis.name = "Tooth length (mm)"
+
+ layout.size = 700 to 400
}
```
@@ -385,11 +383,10 @@ plot(dataset) {
position = posD
}
- layout {
- size = 700 to 400
- xAxisLabel = "Dose (mg)"
- yAxisLabel = "Tooth length (mm)"
- }
+ x.axis.name = "Dose (mg)"
+ y.axis.name = "Tooth length (mm)"
+
+ layout.size = 700 to 400
}
```
diff --git a/docs/topics/guides/Formatting-Guide.md b/docs/topics/guides/Formatting-Guide.md
index 3ec69e888..ccaeb81b0 100644
--- a/docs/topics/guides/Formatting-Guide.md
+++ b/docs/topics/guides/Formatting-Guide.md
@@ -374,9 +374,9 @@ economics.plot {
x.constant(LocalDate(2001, 1, 1).atStartOfDayIn(TimeZone.UTC).toEpochMilliseconds())
y.constant(unemploymentMean + 0.5)
}
+ y.axis.name = "unemployment rate"
layout {
title = "The US Unemployment Rates 2000-2016."
- yAxisLabel = "unemployment rate"
size = 900 to 400
}
}
diff --git a/docs/topics/guides/Legend-and-Axis-Guide.md b/docs/topics/guides/Legend-and-Axis-Guide.md
index 272b4cb29..fec7b4b20 100644
--- a/docs/topics/guides/Legend-and-Axis-Guide.md
+++ b/docs/topics/guides/Legend-and-Axis-Guide.md
@@ -194,6 +194,8 @@ mpgDf.plot {
}
}
}
+ x.axis.name = "Engine displacement (L)"
+ y.axis.name = "Highway MPG"
layout {
size = 700 to 350
style {
@@ -204,8 +206,6 @@ mpgDf.plot {
direction = LegendDirection.HORIZONTAL
}
}
- xAxisLabel = "Engine displacement (L)"
- yAxisLabel = "Highway MPG"
}
}
```
diff --git a/docs/topics/guides/Plot-Bunch-Guide.md b/docs/topics/guides/Plot-Bunch-Guide.md
index 1961c80f7..ffd5f3994 100644
--- a/docs/topics/guides/Plot-Bunch-Guide.md
+++ b/docs/topics/guides/Plot-Bunch-Guide.md
@@ -50,11 +50,7 @@ plot {
color = Color.GREY
alpha = .4
}
- layout {
- size = 600 to 200
- xAxisLabel = "x"
- yAxisLabel = "y"
- }
+ layout.size = 600 to 200
}
```
@@ -69,10 +65,7 @@ plot {
histogram(xs) {
fillColor = Color.named("dark_magenta")
}
- layout {
- size = 600 to 200
- xAxisLabel = "x"
- }
+ layout.size = 600 to 200
}
```
@@ -92,10 +85,7 @@ plotBunch {
x { scale = scaleX }
fillColor = Color.named("dark_magenta")
}
- layout {
- size = 600 to 200
- xAxisLabel = "x"
- }
+ layout.size = 600 to 200
}, 0, 0)
add(plot {
points {
@@ -104,11 +94,7 @@ plotBunch {
color = Color.GREY
alpha = .4
}
- layout {
- size = 600 to 200
- xAxisLabel = "x"
- yAxisLabel = "y"
- }
+ layout.size = 600 to 200
}, 0, 200)
}
```
@@ -151,7 +137,6 @@ plotBunch {
}
layout {
size = 600 to 200
- xAxisLabel = "x"
style(upperStyle)
}
}, 0, 0)
@@ -164,8 +149,6 @@ plotBunch {
}
layout {
size = 600 to 200
- xAxisLabel = "x"
- yAxisLabel = "y"
style(lowerStyle)
}
}, 0, 200)
@@ -193,7 +176,6 @@ plotBunch {
}
layout {
size = 600 to 200
- xAxisLabel = "x"
style(upperStyle)
}
}, 0, 0, 600, 100)
@@ -206,8 +188,6 @@ plotBunch {
}
layout {
size = 600 to 200
- xAxisLabel = "x"
- yAxisLabel = "y"
style(lowerStyle)
}
}, 0, 100, 600, 300)
diff --git a/docs/topics/samples/area/Area-Settings.md b/docs/topics/samples/area/Area-Settings.md
index 56ec518f2..e28ee33d6 100644
--- a/docs/topics/samples/area/Area-Settings.md
+++ b/docs/topics/samples/area/Area-Settings.md
@@ -30,7 +30,6 @@ val time = column("time")
val load = column("load")
loadServer.plot {
- layout.title = "Daily Server Load Dynamics"
area {
x(time) { axis.name = "Time" }
y(load) {
@@ -45,6 +44,8 @@ loadServer.plot {
fillColor = Color.RED
alpha = 0.7
}
+
+ layout.title = "Daily Server Load Dynamics"
}
```
@@ -56,7 +57,6 @@ val time = listOf("00:00", "03:00", "06:00", "09:00", "12:00", "15:00", "18:00",
val load = listOf(10, 5, 15, 50, 75, 60, 80, 40)
plot {
- layout.title = "Daily Server Load Dynamics"
area {
x(time) { axis.name = "Time" }
y(load) { axis.name = "Load (%)" }
@@ -68,6 +68,8 @@ plot {
fillColor = Color.RED
alpha = 0.7
}
+
+ layout.title = "Daily Server Load Dynamics"
}
```
diff --git a/docs/topics/samples/area/Fixed-Area-Coordinate.md b/docs/topics/samples/area/Fixed-Area-Coordinate.md
index 2cce32d8e..2759409dc 100644
--- a/docs/topics/samples/area/Fixed-Area-Coordinate.md
+++ b/docs/topics/samples/area/Fixed-Area-Coordinate.md
@@ -34,15 +34,13 @@ val waterLvl by columnOf(4.5, 4.7, 5.0, 5.5, 6.0, 6.5, 6.7, 6.2, 5.8, 5.3, 4.8,
val reservoirDf = dataFrameOf(month, waterLvl)
plot(reservoirDf) {
- layout {
- title = "Water Level"
- subtitle = "Annual Water Level Fluctuations in Reservoir"
- yAxisLabel = "Month"
- xAxisLabel = "Water Level (meters)"
+ x(month) {
+ axis.name = "Month"
+ }
+ y.axis {
+ name = "Water Level (meters)"
+ limits = 3.0..8.0
}
-
- x(month)
- y { axis.limits = 3.0..8.0 }
line {
y(waterLvl)
}
@@ -52,6 +50,11 @@ plot(reservoirDf) {
alpha = 0.5
fillColor = Color.RED
}
+
+ layout {
+ title = "Water Level"
+ subtitle = "Annual Water Level Fluctuations in Reservoir"
+ }
}
```
@@ -71,15 +74,13 @@ val reservoirDf = mapOf(
)
plot(reservoirDf) {
- layout {
- title = "Water Level"
- subtitle = "Annual Water Level Fluctuations in Reservoir"
- yAxisLabel = "Month"
- xAxisLabel = "Water Level (meters)"
+ x("month") {
+ axis.name = "Month"
+ }
+ y.axis {
+ name = "Water Level (meters)"
+ limits = 3.0..8.0
}
-
- x("month")
- y { axis.limits = 3.0..8.0 }
line {
y("waterLvl")
}
@@ -89,6 +90,11 @@ plot(reservoirDf) {
alpha = 0.5
fillColor = Color.RED
}
+
+ layout {
+ title = "Water Level"
+ subtitle = "Annual Water Level Fluctuations in Reservoir"
+ }
}
```
diff --git a/docs/topics/samples/bars/Bar-Settings.md b/docs/topics/samples/bars/Bar-Settings.md
index 48d396740..9014bbd9e 100644
--- a/docs/topics/samples/bars/Bar-Settings.md
+++ b/docs/topics/samples/bars/Bar-Settings.md
@@ -29,11 +29,6 @@ val candy by columnOf(
val sugar by columnOf(65, 58, 53, 35, 40, 45, 50)
plot {
- layout {
- title = "Sugar content"
- xAxisLabel = "Candy Name"
- yAxisLabel = "Sugar Content (g per 100g)"
- }
bars {
x(candy)
y(sugar) { scale = continuous(0..100) }
@@ -44,6 +39,11 @@ plot {
width = 1.3
}
}
+
+ x.axis.name = "Candy Name"
+ y.axis.name = "Sugar Content (g per 100g)"
+
+ layout.title = "Sugar content"
}
```
@@ -58,11 +58,6 @@ val candy = listOf(
val sugar = listOf(65, 58, 53, 35, 40, 45, 50)
plot {
- layout {
- title = "Sugar content"
- xAxisLabel = "Candy Name"
- yAxisLabel = "Sugar Content (g per 100g)"
- }
bars {
x(candy)
y(sugar) { scale = continuous(0..100) }
@@ -73,6 +68,11 @@ plot {
width = 1.3
}
}
+
+ x.axis.name = "Candy Name"
+ y.axis.name = "Sugar Content (g per 100g)"
+
+ layout.title = "Sugar content"
}
```
diff --git a/docs/topics/samples/line/Path-Line.md b/docs/topics/samples/line/Path-Line.md
index 72954b6c6..40c0fe8fa 100644
--- a/docs/topics/samples/line/Path-Line.md
+++ b/docs/topics/samples/line/Path-Line.md
@@ -22,20 +22,18 @@ val dist = listOf(100, 90, 80, 70, 60, 50, 40)
val temp = listOf(-45.5, -44.4, -40.0, -43.2, -41.5, -35.5, -39.9)
plot {
+ path {
+ y(dist,"Performance Measure")
+ x(temp, "Temperature (°C)")
+ color = Color.BLUE
+ type = LineType.LONGDASH
+ }
+
layout {
title = "Performance Dependency on Temperature"
subtitle = "Analysis of Material Performance Decline at Extremely Low Temperatures"
- yAxisLabel = "Performance Measure"
size = 600 to 550
}
- path {
- y(dist)
- x(temp) {
- axis.name = "Temperature (°C)"
- }
- color = Color.BLUE
- type = LineType.LONGDASH
- }
}
```
diff --git a/examples/notebooks/lets-plot/guides/error_bars.ipynb b/examples/notebooks/lets-plot/guides/error_bars.ipynb
index 3fe76a526..62adb8248 100644
--- a/examples/notebooks/lets-plot/guides/error_bars.ipynb
+++ b/examples/notebooks/lets-plot/guides/error_bars.ipynb
@@ -4,8 +4,8 @@
"cell_type": "code",
"metadata": {
"ExecuteTime": {
- "end_time": "2025-02-03T09:12:16.148421Z",
- "start_time": "2025-02-03T09:12:03.289387Z"
+ "end_time": "2025-02-17T13:45:00.556652Z",
+ "start_time": "2025-02-17T13:44:56.084739Z"
}
},
"source": [
@@ -34,8 +34,8 @@
"cell_type": "code",
"metadata": {
"ExecuteTime": {
- "end_time": "2025-02-03T09:12:19.039326Z",
- "start_time": "2025-02-03T09:12:16.436189Z"
+ "end_time": "2025-02-17T13:45:01.017673Z",
+ "start_time": "2025-02-17T13:45:00.588945Z"
}
},
"source": [
@@ -61,8 +61,8 @@
"cell_type": "code",
"metadata": {
"ExecuteTime": {
- "end_time": "2025-02-03T09:12:21.123360Z",
- "start_time": "2025-02-03T09:12:19.049825Z"
+ "end_time": "2025-02-17T13:45:01.440512Z",
+ "start_time": "2025-02-17T13:45:01.043479Z"
}
},
"source": [
@@ -96,7 +96,7 @@
" <script type="text/javascript" data-lets-plot-script="library" src="https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.5.1/js-package/distr/lets-plot.min.js"></script>\n",
" </head>\n",
" <body>\n",
- " <div id="fgR5vo"></div>\n",
+ " <div id="BqJ6Ye"></div>\n",
" <script type="text/javascript" data-lets-plot-script="plot">\n",
" \n",
" (function() {\n",
@@ -200,7 +200,7 @@
"},\n",
""spec_id":"2"\n",
"};\n",
- " var containerDiv = document.getElementById("fgR5vo");\n",
+ " var containerDiv = document.getElementById("BqJ6Ye");\n",
" \n",
" var toolbar = null;\n",
" var plotContainer = containerDiv; \n",
@@ -223,7 +223,7 @@
" \n",
" </script>\n",
" </body>\n",
- "</html>\">