diff --git a/Writerside/images/screenshots/markdown.png b/Writerside/images/screenshots/markdown.png new file mode 100644 index 00000000..b0567154 Binary files /dev/null and b/Writerside/images/screenshots/markdown.png differ diff --git a/Writerside/topics/aesthetics.md b/Writerside/topics/aesthetics.md index f098c223..e6b2dbe6 100644 --- a/Writerside/topics/aesthetics.md +++ b/Writerside/topics/aesthetics.md @@ -8,6 +8,8 @@ Colors and fills of geometries can be specified in the following ways: - HEX (e.g. `"#0000ff"`, `"#00f"`). +- Blank string (`""`) or aliases: `"blank"`, `"transparent"` for a fully transparent color. + - A name, one of: ![Color names](aesthetics_color.png) diff --git a/Writerside/topics/charts.md b/Writerside/topics/charts.md index 8ac666f9..0299ee6e 100644 --- a/Writerside/topics/charts.md +++ b/Writerside/topics/charts.md @@ -165,12 +165,15 @@ Examples: ## Bivariate Distribution [`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) Examples: - [2d density](%nb-density_2d%) +- [Hexagonal heatmap](%nb-geom_hex%) +- [Absolute unit specification for width and height aesthetics](%nb-param_width_unit%) ## Marginal Plots diff --git a/Writerside/topics/misc.md b/Writerside/topics/misc.md index 1f3c63f5..9b40afa2 100644 --- a/Writerside/topics/misc.md +++ b/Writerside/topics/misc.md @@ -20,7 +20,7 @@ In tooltips/labels/texts and wherever else there is text, you can use: The observable LP-verse -- LaTeX formulas with +- Limited LaTeX support: - superscript, e.g. `\( a^b \)`; - subscript, e.g. `\( x_i \)`; @@ -31,6 +31,17 @@ In tooltips/labels/texts and wherever else there is text, you can use: LaTeX Support +- Limited markdown support: + + - emphasis (`*`, `**`, `***`, `_`, `__`, `___`), + - coloring with inline style (`text`), + - links with anchor tags (`Lets-Plot`), and + - multiple lines using double space and a newline delimiter (`\n`). + + See: [markdown.ipynb](%nb-markdown%) + + Markdown support + ## Manual Legend In Lets-Plot, as in ggplot2, legends are automatically generated based on the aesthetic mappings in the plot. diff --git a/Writerside/v.list b/Writerside/v.list index dcd38c08..d97bfe2d 100644 --- a/Writerside/v.list +++ b/Writerside/v.list @@ -73,6 +73,7 @@ + @@ -101,9 +102,11 @@ + + diff --git a/future_changes.md b/future_changes.md index f954c894..9f3c1c4e 100644 --- a/future_changes.md +++ b/future_changes.md @@ -6,6 +6,7 @@ GeoTools [v 32.1](https://github.com/geotools/geotools/releases/tag/32.0) ### Added - Geometries: + - `geomHex()` [[#556](https://github.com/JetBrains/lets-plot/issues/556)]. See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/geom_hex.ipynb). @@ -19,17 +20,19 @@ GeoTools [v 32.1](https://github.com/geotools/geotools/releases/tag/32.0) See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/geom_pie_params.ipynb). - Texts and labels: + - `hjust` and `vjust` parameters for axis labels [[#1227](https://github.com/JetBrains/lets-plot/issues/1227)],[[#1230](https://github.com/JetBrains/lets-plot/issues/1230)]. - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/master/docs/examples/jupyter-notebooks/f-4.10.0/axis_label_justification.ipynb). + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/axis_label_justification.ipynb). - multiline support for axis labels [[#948](https://github.com/JetBrains/lets-plot/issues/948)]. - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/master/docs/examples/jupyter-notebooks/f-4.10.0/multiline_axis_labels.ipynb). + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/multiline_axis_labels.ipynb). - Markdown support for plot **title**, **subtitle**, **caption**, and axis labels [[#1256](https://github.com/JetBrains/lets-plot/issues/1256)]. See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/markdown.ipynb). + ### Changed - [**BREAKING**] The `height` parameter has been deprecated for the `geomErrorBar`. diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt index 9076abab..c829f9cc 100755 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt @@ -70,7 +70,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * For more info see: [aesthetics.html#line-types](https://lets-plot.org/kotlin/aesthetics.html#line-types). * @param size Line width. * @param widthUnit default = "res". - * Unit for the whisker width of the vertical error bar. + * Unit for the whisker width of the error bar. * Possible values: * * - "res": the unit equals the smallest distance between adjacent error bars along the corresponding axis; diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_hex.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_hex.kt index d0c3364d..f788d6ac 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_hex.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_hex.kt @@ -25,9 +25,14 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * To hide axis tooltips, set "blank" or the result of `elementBlank()` * to the `axisTooltip`, `axisTooltipX` or `axisTooltipY` parameter of the `theme()`. * + * ## Examples + * + * - [geom_hex.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_hex.ipynb) + * * @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]. - * @param stat default = `Stat.binhex()`. The statistical transformation to use on the data for this layer. + * @param stat default = `Stat.binhex()`. + * The statistical transformation to use on the data for this layer. * Supported transformations: `Stat.identity`, `Stat.bin()`, `Stat.count()`, etc. see [Stat][org.jetbrains.letsPlot.Stat]. * @param position Position adjustment: `positionIdentity`, `positionStack()`, `positionDodge()`, etc. see * [Position](https://lets-plot.org/kotlin/-lets--plot--kotlin/org.jetbrains.letsPlot.pos/). diff --git a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pie.kt b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pie.kt index 90823c4a..7ff4a5f7 100644 --- a/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pie.kt +++ b/plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pie.kt @@ -49,6 +49,8 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * * - [geom_pie_size_unit.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_pie_size_unit.ipynb) * + * - [geom_pie_params.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_pie_params.ipynb) + * * @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]. * @param stat default = `Stat.count2d()`. The statistical transformation to use on the data for this layer. @@ -106,9 +108,9 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions * @param spacerColor Color for spacers between sectors. By default, the "paper" color is used. * For more info see: [aesthetics.html#color-and-fill](https://lets-plot.org/kotlin/aesthetics.html#color-and-fill). * @param start Specify the angle at which the first sector starts. Accept values between 0 and 360. - * Default is a negative angle of the first sector. - * @param direction Specify angle direction, 1=clockwise, -1=counter-clockwise. - * Default is 1. + * Default is a negative angle of the first sector. + * @param direction default = 1. + * Specify angle direction, 1=clockwise, -1=counter-clockwise. * @param sizeUnit Relates the size of the pie chart to the length of the unit step along one of the axes. * Possible values: "x", "y". If not specified, no fitting is performed. * @param fillBy default = "fill" ("fill", "color", "paint_a", "paint_b", "paint_c"). 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 07a272cb..988bade8 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 @@ -613,9 +613,7 @@ fun elementText( * * ## Examples * - * - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb) - * - * - [axis_text_angle.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/axis_text_angle.ipynb) + * - [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. * @param family Font family.