Skip to content

Updates in docs #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Writerside/images/screenshots/markdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Writerside/topics/aesthetics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions Writerside/topics/charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion Writerside/topics/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In tooltips/labels/texts and wherever else there is text, you can use:

<img src="lp_verse.png" alt="The observable LP-verse" width="480"/>

- LaTeX formulas with
- Limited LaTeX support:

- superscript, e.g. `\( a^b \)`;
- subscript, e.g. `\( x_i \)`;
Expand All @@ -31,6 +31,17 @@ In tooltips/labels/texts and wherever else there is text, you can use:

<img src="latex_support.png" alt="LaTeX Support" width="480"/>

- Limited markdown support:

- emphasis (`*`, `**`, `***`, `_`, `__`, `___`),
- coloring with inline style (`<span style='color:red'>text</span>`),
- links with anchor tags (`<a href="https://lets-plot.org">Lets-Plot</a>`), and
- multiple lines using double space and a newline delimiter (`\n`).

See: [markdown.ipynb](%nb-markdown%)

<img src="markdown.png" alt="Markdown support" width="480"/>

## Manual Legend

In Lets-Plot, as in ggplot2, legends are automatically generated based on the aesthetic mappings in the plot.
Expand Down
3 changes: 3 additions & 0 deletions Writerside/v.list
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<var name="nb-geom_curve" value="%nbviewer_cookbook%/geom_curve.ipynb"/>
<var name="nb-geom_dotplot" value="%nbviewer_cookbook%/geom_dotplot.ipynb"/>
<var name="nb-geom_function" value="%nbviewer_cookbook%/geom_function.ipynb"/>
<var name="nb-geom_hex" value="%nbviewer_cookbook%/geom_hex.ipynb"/>
<var name="nb-geom_histogram_threshold" value="%nbviewer_cookbook%/geom_histogram_threshold.ipynb"/>
<var name="nb-geom_lollipop" value="%nbviewer_cookbook%/geom_lollipop.ipynb"/>
<var name="nb-geom_pie" value="%nbviewer_cookbook%/geom_pie.ipynb"/>
Expand Down Expand Up @@ -101,9 +102,11 @@
<var name="nb-manual_legend" value="%nbviewer_cookbook%/manual_legend.ipynb"/>
<var name="nb-marginal_layers" value="%nbviewer_cookbook%/marginal_layers.ipynb"/>
<var name="nb-margins" value="%nbviewer_cookbook%/margins.ipynb"/>
<var name="nb-markdown" value="%nbviewer_cookbook%/markdown.ipynb"/>
<var name="nb-multiple_color_scales" value="%nbviewer_cookbook%/multiple_color_scales.ipynb"/>
<var name="nb-ordering_examples" value="%nbviewer_cookbook%/ordering_examples.ipynb"/>
<var name="nb-panel_border" value="%nbviewer_cookbook%/panel_border.ipynb"/>
<var name="nb-param_width_unit" value="%nbviewer_cookbook%/param_width_unit.ipynb"/>
<var name="nb-plot_grid" value="%nbviewer_cookbook%/plot_grid.ipynb"/>
<var name="nb-position_stack" value="%nbviewer_cookbook%/position_stack.ipynb"/>
<var name="nb-projection_provided" value="%nbviewer_cookbook%/projection_provided.ipynb"/>
Expand Down
7 changes: 5 additions & 2 deletions future_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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").
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down