From 3f8c9fee65a7471c26f8a1c36d7007513c4f4588 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 14 Mar 2025 11:22:39 +0100 Subject: [PATCH 1/4] Replace small cookbooks about theme by the big one. --- Writerside/topics/presentation_options.md | 8 ++----- Writerside/topics/tooltips.md | 2 +- Writerside/v.list | 6 +---- docs/dokka/source/packages.md | 2 +- .../org/jetbrains/letsPlot/themes/theme.kt | 23 ++++++------------- 5 files changed, 12 insertions(+), 29 deletions(-) diff --git a/Writerside/topics/presentation_options.md b/Writerside/topics/presentation_options.md index 74eeed33..17eb4dca 100644 --- a/Writerside/topics/presentation_options.md +++ b/Writerside/topics/presentation_options.md @@ -16,14 +16,10 @@ - [Themes overview](%nb-themes%) - [Default theme](%nb-default_theme%) -- [Applying common theme to a plot group](%nb-gggrid_theme%) -- [Plot margins](%nb-theme_plot_margin%) -- [Option to show/hide plot messages](%nb-theme_plot_message%) - [Justification for text elements](%nb-hjust_vjust%) - [Margins](%nb-margins%) - [`margin` parameter of `elementText()`](%nb-text_margins%) - [Panel border](%nb-panel_border%) -- [Tooltip properties in `theme()`](%nb-tooltips_theme%) - [Plot title, subtitle and caption](%nb-title_subtitle_caption%) - [Theme colors for geometries](%nb-geom_theme_colors%) - [Customize legend appearance](%nb-legend_theme%) @@ -52,8 +48,8 @@ ### Predefined Themes Examples - [Default theme](%nb-default_theme%) +- [Themes overview](%nb-themes%) - [Theme flavors](%nb-theme_flavors%) -- [Applying common theme to a plot group](%nb-gggrid_theme%) - [Margins](%nb-margins%) - [`margin` parameter of `elementText()`](%nb-text_margins%) - [Theme colors for geometries](%nb-geom_theme_colors%) @@ -75,6 +71,6 @@ ### Flavors Examples - [Theme flavors](%nb-theme_flavors%) -- [Applying common theme to a plot group](%nb-gggrid_theme%) +- [Themes overview](%nb-themes%) - [Theme colors for geometries](%nb-geom_theme_colors%) - [Annotation labels on pie-chart](%nb-annotations_for_pie%) \ No newline at end of file diff --git a/Writerside/topics/tooltips.md b/Writerside/topics/tooltips.md index fd372917..3ea70d72 100644 --- a/Writerside/topics/tooltips.md +++ b/Writerside/topics/tooltips.md @@ -12,4 +12,4 @@ See also the [formatting reference](formats.md) to learn how to format numeric a - [Tooltip title](%nb-tooltip_title%) - [Tooltip customization](%nb-tooltip_config%) -- [Tooltip properties in `theme()`](%nb-tooltips_theme%) \ No newline at end of file +- [Tooltip properties in `theme()`](%nb-themes%) \ No newline at end of file diff --git a/Writerside/v.list b/Writerside/v.list index d97bfe2d..7fd9dce3 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -84,7 +84,6 @@ - @@ -132,13 +131,10 @@ - - - + - \ No newline at end of file diff --git a/docs/dokka/source/packages.md b/docs/dokka/source/packages.md index 6e9e9a2a..e1095bdb 100644 --- a/docs/dokka/source/packages.md +++ b/docs/dokka/source/packages.md @@ -174,7 +174,7 @@ See [tooltips.html](https://lets-plot.org/kotlin/tooltips.html). - [tooltip_title.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/tooltip_title.ipynb) -- [tooltips_theme.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/tooltips_theme.ipynb) +- [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h#Tooltips) # Package org.jetbrains.letsPlot.annotations 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 988bade8..98ee55c2 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 @@ -24,19 +24,12 @@ import org.jetbrains.letsPlot.intern.filterNonNullValues * * ## Examples * - * - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb) + * - [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h) * * - [legend.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/legend.ipynb) * - * - [theme_label_text.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/theme_label_text.ipynb) - * * - [superscript_exponent.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/superscript_exponent.ipynb) * - * - [theme_panel_inset.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/theme_panel_inset.ipynb) - * - * - [theme_plot_inset.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/theme_plot_inset.ipynb) - * - * * @param exponentFormat default="e" ("e", "pow", "pow_full"). * Controls the appearance of numbers formatted with "e" or "g" types. * @@ -478,7 +471,7 @@ class theme( * * ## Examples * - * - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb) + * - [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h) */ fun elementBlank() = mapOf(Option.Theme.Elem.BLANK to true) @@ -489,9 +482,7 @@ fun elementBlank() = mapOf(Option.Theme.Elem.BLANK to true) * * ## Examples * - * - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb) - * - * - [theme_linetype.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/theme_linetype.ipynb) + * - [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h) * * @param fill Fill color. Accepts color core as string (HEX or rgb) or Color object. * @param color Border color. Accepts color core as string (HEX or rgb) or Color object. @@ -523,9 +514,7 @@ fun elementRect( * * ## Examples * - * - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb) - * - * - [theme_linetype.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/theme_linetype.ipynb) + * - [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h) * * @param color Line color. Accepts color core as string (HEX or rgb) or Color object. * @param size Line width. @@ -554,7 +543,7 @@ fun elementLine( * * ## Examples * - * - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb) + * - [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h) * * - [axis_text_angle.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/axis_text_angle.ipynb) * @@ -613,6 +602,8 @@ fun elementText( * * ## Examples * + * - [themes.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/rjq52BpjPak2geihq3ol1h) + * * - [markdown.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/markdown.ipynb) * * @param color Text color. Accepts color core as string (HEX or rgb) or Color object. From 6e6fbe0e2be79556c69e54fa6b15477c5d9c39c5 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 14 Mar 2025 11:40:36 +0100 Subject: [PATCH 2/4] Small fixes in the position_nudge_unit.ipynb notebook. --- .../f-4.10.0/position_nudge_unit.ipynb | 71 ++++++++++--------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/docs/examples/jupyter-notebooks/f-4.10.0/position_nudge_unit.ipynb b/docs/examples/jupyter-notebooks/f-4.10.0/position_nudge_unit.ipynb index 3528e77c..52745c44 100644 --- a/docs/examples/jupyter-notebooks/f-4.10.0/position_nudge_unit.ipynb +++ b/docs/examples/jupyter-notebooks/f-4.10.0/position_nudge_unit.ipynb @@ -7,14 +7,14 @@ "source": [ "# Configuring Nudge Units in Position Adjustments\n", "\n", - "The position adjustment `position_nudge()` now supports the `unit` parameter that specifies the measurement system for nudge offsets.
\n", - "Equivalent parameter is also available as `nudge_unit` in `geom_text()` and `geom_label()` directly. \n", + "The position adjustment `positionNudge()` now supports the `unit` parameter that specifies the measurement system for nudge offsets.
\n", + "Equivalent parameter is also available as `nudgeUnit` in `geomText()` and `geomLabel()` directly. \n", "\n", "Available Units:\n", "\n", - "- `'identity'` (default): nudge in data coordinates - a value of 1 corresponds to the distance from 0 to 1 on the axis\n", - "- `'size'`: nudge relative to point size - a value of 1 corresponds to the diameter of a point with size 1\n", - "- `'px'`: nudge in fixed pixels - a value of 1 corresponds to 1 pixel" + "- `\"identity\"` (default): nudge in data coordinates - a value of 1 corresponds to the distance from 0 to 1 on the axis\n", + "- `\"size\"`: nudge relative to point size - a value of 1 corresponds to the diameter of a point with size 1\n", + "- `\"px\"`: nudge in fixed pixels - a value of 1 corresponds to 1 pixel" ] }, { @@ -26,7 +26,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " @@ -77,7 +77,7 @@ { "data": { "text/plain": [ - "Lets-Plot Kotlin API v.hehe. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.6.0." + "Lets-Plot Kotlin API v.4.6.1. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.6.1." ] }, "execution_count": 2, @@ -106,7 +106,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", "