diff --git a/Writerside/images/Python4DS.png b/Writerside/images/Python4DS.png deleted file mode 100644 index 2ca9e3bae..000000000 Binary files a/Writerside/images/Python4DS.png and /dev/null differ diff --git a/Writerside/images/coding_for_economists.png b/Writerside/images/coding_for_economists.png deleted file mode 100644 index 2fddea935..000000000 Binary files a/Writerside/images/coding_for_economists.png and /dev/null differ diff --git a/Writerside/images/previews/square-legend_theme.png b/Writerside/images/previews/square-legend_theme.png deleted file mode 100644 index 6b6f6c6bf..000000000 Binary files a/Writerside/images/previews/square-legend_theme.png and /dev/null differ diff --git a/Writerside/images/previews/square-theme_legend_scheme.png b/Writerside/images/previews/square-theme_legend_scheme.png new file mode 100644 index 000000000..32da8d134 Binary files /dev/null and b/Writerside/images/previews/square-theme_legend_scheme.png differ diff --git a/Writerside/images/screenshots/geom_label.png b/Writerside/images/screenshots/text_geoms.png similarity index 100% rename from Writerside/images/screenshots/geom_label.png rename to Writerside/images/screenshots/text_geoms.png diff --git a/Writerside/topics/annotations.md b/Writerside/topics/annotations.md index fb9272be4..029856320 100644 --- a/Writerside/topics/annotations.md +++ b/Writerside/topics/annotations.md @@ -1,6 +1,7 @@ # Annotating Charts You can customize the content of annotations for pie and bar charts by using the parameter `labels` of the corresponding functions. +The parameter takes as value the result of the [`layerLabels()`](%api_annotations%/layer-labels/index.html) function call. [Learn more (datalore link)](%nbp-annotations%). diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index 48bf6d1b0..4f8d236cc 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -218,4 +218,18 @@ Examples: Examples: - [Flipped coordinates](%nb-coord_flip%) -- [Polar coordinate system](%nb-coord_polar%) \ No newline at end of file +- [Polar coordinate system](%nb-coord_polar%) + + +## Legends and Guides + +[`guideLegend()`](%api_scale%/guide-legend.html), +[`guideColorbar()`](%api_scale%/guide-colorbar.html), +[`guides()`](%api_scale%/guides.html), +[`layerKey()`](%api_scale%/layer-key.html) + +Examples: + +- [Legend customization](%nb-legend%) +- [Manual legend](%nb-manual_legend%) +- [Customize legend appearance](%nb-legend_theme%) \ No newline at end of file diff --git a/Writerside/topics/formats.md b/Writerside/topics/formats.md index e1d6a61b4..050690301 100644 --- a/Writerside/topics/formats.md +++ b/Writerside/topics/formats.md @@ -78,6 +78,10 @@ The numeric format strings are used to format common numeric types. The general - `Z` - zetta, 10²¹ - `Y` - yotta, 10²⁴ + + These formatting rules are compatible with formatting from the d3 library, so you can find out more about the options listed above by visiting this page. + + ### Number Format Examples Let's format the number `1024`: @@ -107,12 +111,20 @@ Some other examples: ``` format number result .1f 0.42 "0.4" -.3g 0.4449 "0.445" -,.12g -4200000 "-4,200,000" -0,.2f 1234567.449 "1,234,567.45" +0,.1f 1234567.89 "1,234,567.9" +$,.2f 1e4 "+$10,000.00" ++$,.2~f 1e4 "+$10,000" +~g 0.0000042 "0.0000042" +~g 0.00000042 "4.2e-7" +~g 420000 "420000" +~g 4200000 "4.2e+6" +,.2g -4231 "-4,2e+3" +,.6g -4231 "-4,231.00" +,.6~g -4231 "-4,231" ``` +See more examples here. + ## String Template The number format can be used in a template to create a string with variable substitution. @@ -220,5 +232,5 @@ You can format text in annotations, see: [Annotating Charts](annotations.md). ## Demo Notebooks - [Formatting labels on plots](%nb-formatting_axes_etc%) -- [The `label_format` parameter in `geom_text()`](%nb-label_format%) +- [Text geoms](%nb-text_geoms%) - [Exponent format in Lets-Plot](%nb-superscript_exponent%) \ No newline at end of file diff --git a/Writerside/topics/gallery.md b/Writerside/topics/gallery.md index 58c34aa49..57950b8d8 100644 --- a/Writerside/topics/gallery.md +++ b/Writerside/topics/gallery.md @@ -2,8 +2,8 @@
  • - - Customize legend appearance + + Theme legend scheme
  • diff --git a/Writerside/topics/geospatial_charts.md b/Writerside/topics/geospatial_charts.md index bbdd24b7f..98b5d9a1b 100644 --- a/Writerside/topics/geospatial_charts.md +++ b/Writerside/topics/geospatial_charts.md @@ -106,6 +106,6 @@ When declaring additional GeoTools dependencies, check the compatible version in Using exotic map projections - Label geometry: - [geom_label.ipynb](%nb-geom_label%) + [text_geoms.ipynb](%nb-text_geoms%) - Label geometry \ No newline at end of file + Text geoms \ No newline at end of file diff --git a/Writerside/topics/presentation_options.md b/Writerside/topics/presentation_options.md index b285ae39f..74eeed33a 100644 --- a/Writerside/topics/presentation_options.md +++ b/Writerside/topics/presentation_options.md @@ -12,6 +12,28 @@ [`guideColorbar()`](%api_scale%/guide-colorbar.html), [`guides()`](%api_scale%/guides.html) +### Examples + +- [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%) +- [Tooltip customization](%nb-tooltip_config%) +- [Set font faces](%nb-set_font_faces%) +- [Set font size and family](%nb-font_size_and_family%) +- [Rotation of axis labels](%nb-axis_text_angle%) +- [Exponent format in Lets-Plot](%nb-superscript_exponent%) +- [Annotation labels on pie-chart](%nb-annotations_for_pie%) + ## Predefined Themes [`minimal2`](%api_theme%/theme-minimal2.html), @@ -27,6 +49,17 @@ All predefined themes +### Predefined Themes Examples + +- [Default theme](%nb-default_theme%) +- [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%) +- [Axis position](%nb-axis_position%) +- [Exponent format in Lets-Plot](%nb-superscript_exponent%) + ## Color Schemes (Flavors) [`darcula`](%api_theme%/flavor-darcula.html), @@ -39,26 +72,9 @@ Theme colors for geometries -## Examples +### Flavors 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%) -- [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%) -- [Theme flavors](%nb-theme_flavors%) -- [Customizing the legend](%nb-legend%) -- [Tooltip customization](%nb-tooltip_config%) -- [Set font faces](%nb-set_font_faces%) -- [Set font size and family](%nb-font_size_and_family%) -- [Axis position](%nb-axis_position%) -- [Rotation of axis labels](%nb-axis_text_angle%) -- [Exponent format in Lets-Plot](%nb-superscript_exponent%) - [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 f62a0227a..fd372917e 100644 --- a/Writerside/topics/tooltips.md +++ b/Writerside/topics/tooltips.md @@ -1,6 +1,7 @@ # Tooltip Customization -You can customize the content, values formatting and appearance of tooltip for any geometry layer in your plot. +You can customize the content, values formatting and appearance of tooltip for any geometry layer by using the parameter `tooltips`. +The parameter takes as value the result of the [`layerToltips()`](%api_tooltips%/layer-tooltips/index.html) function call. [Learn more (datalore link)](%nbp-tooltips%). diff --git a/Writerside/v.list b/Writerside/v.list index 2f6dee655..b1f8728e8 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -1,7 +1,7 @@ - + @@ -33,13 +33,13 @@ - + @@ -72,12 +72,10 @@ - - @@ -94,9 +92,9 @@ - + @@ -126,6 +124,7 @@ + diff --git a/docs/dokka/source/packages.md b/docs/dokka/source/packages.md index 755c1cb4b..6e9e9a2af 100644 --- a/docs/dokka/source/packages.md +++ b/docs/dokka/source/packages.md @@ -96,9 +96,7 @@ letsPlot(data) + - `geomTile()`, `geomContour()`, `geomPolygon()` (`Stat.contour()`), `geomContourFilled()`: [contours.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/contours.ipynb) -- `geomText()`: [label_format.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/label_format.ipynb) - -- `geomLabel()`: [geom_label.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_label.ipynb) +- `geomText()`, `geomLabel()`: [text_geoms.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/Lb69ZPTQWq3XbupPxnQ4Rh) - `geomQQ()`, `geomQQLine()`, `geomQQ2()`, `geomQQ2Line()`, `qqPlot()`: [qq_plots.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/qq_plots.ipynb) diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label.kt index 061fcc858..926724287 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_label.kt @@ -24,9 +24,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * * ## Examples * - * - [geom_label.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_label.ipynb) - * - * - [geom_label_alpha_stroke.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_label_alpha_stroke.ipynb) + * - [text_geoms.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/Lb69ZPTQWq3XbupPxnQ4Rh) * * @param data The data to be displayed in this layer. If null, the default, the data * is inherited from the plot data as specified in the call to [letsPlot][org.jetbrains.letsPlot.letsPlot]. diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text.kt index 9b68c08f8..cc88727f8 100755 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_text.kt @@ -23,7 +23,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * * ## Examples * - * - [label_format.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/label_format.ipynb) + * - [text_geoms.ipynb](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/Lb69ZPTQWq3XbupPxnQ4Rh) * * - [formatting_axes_etc.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/formatting_axes_etc.ipynb) *