Skip to content

Commit db3e972

Browse files
Updates in docs (#272)
1 parent df848a2 commit db3e972

File tree

10 files changed

+38
-11
lines changed

10 files changed

+38
-11
lines changed
65.9 KB
Loading

Writerside/topics/aesthetics.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Colors and fills of geometries can be specified in the following ways:
88

99
- HEX (e.g. `"#0000ff"`, `"#00f"`).
1010

11+
- Blank string (`""`) or aliases: `"blank"`, `"transparent"` for a fully transparent color.
12+
1113
- A name, one of:
1214

1315
![Color names](aesthetics_color.png)

Writerside/topics/charts.md

+3
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,15 @@ Examples:
165165
## Bivariate Distribution
166166

167167
[`2d bins`](%api_geom%/geom-bin2-d/index.html),
168+
[`2d hexagonal bins`](%api_geom%/geom-hex/index.html),
168169
[`2d density`](%api_geom%/geom-density2-d/index.html),
169170
[`filled 2d density`](%api_geom%/geom-density2-d-filled/index.html)
170171

171172
Examples:
172173

173174
- [2d density](%nb-density_2d%)
175+
- [Hexagonal heatmap](%nb-geom_hex%)
176+
- [Absolute unit specification for width and height aesthetics](%nb-param_width_unit%)
174177

175178

176179
## Marginal Plots

Writerside/topics/misc.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In tooltips/labels/texts and wherever else there is text, you can use:
2020

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

23-
- LaTeX formulas with
23+
- Limited LaTeX support:
2424

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

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

34+
- Limited markdown support:
35+
36+
- emphasis (`*`, `**`, `***`, `_`, `__`, `___`),
37+
- coloring with inline style (`<span style='color:red'>text</span>`),
38+
- links with anchor tags (`<a href="https://lets-plot.org">Lets-Plot</a>`), and
39+
- multiple lines using double space and a newline delimiter (`\n`).
40+
41+
See: [markdown.ipynb](%nb-markdown%)
42+
43+
<img src="markdown.png" alt="Markdown support" width="480"/>
44+
3445
## Manual Legend
3546

3647
In Lets-Plot, as in ggplot2, legends are automatically generated based on the aesthetic mappings in the plot.

Writerside/v.list

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<var name="nb-geom_curve" value="%nbviewer_cookbook%/geom_curve.ipynb"/>
7474
<var name="nb-geom_dotplot" value="%nbviewer_cookbook%/geom_dotplot.ipynb"/>
7575
<var name="nb-geom_function" value="%nbviewer_cookbook%/geom_function.ipynb"/>
76+
<var name="nb-geom_hex" value="%nbviewer_cookbook%/geom_hex.ipynb"/>
7677
<var name="nb-geom_histogram_threshold" value="%nbviewer_cookbook%/geom_histogram_threshold.ipynb"/>
7778
<var name="nb-geom_lollipop" value="%nbviewer_cookbook%/geom_lollipop.ipynb"/>
7879
<var name="nb-geom_pie" value="%nbviewer_cookbook%/geom_pie.ipynb"/>
@@ -101,9 +102,11 @@
101102
<var name="nb-manual_legend" value="%nbviewer_cookbook%/manual_legend.ipynb"/>
102103
<var name="nb-marginal_layers" value="%nbviewer_cookbook%/marginal_layers.ipynb"/>
103104
<var name="nb-margins" value="%nbviewer_cookbook%/margins.ipynb"/>
105+
<var name="nb-markdown" value="%nbviewer_cookbook%/markdown.ipynb"/>
104106
<var name="nb-multiple_color_scales" value="%nbviewer_cookbook%/multiple_color_scales.ipynb"/>
105107
<var name="nb-ordering_examples" value="%nbviewer_cookbook%/ordering_examples.ipynb"/>
106108
<var name="nb-panel_border" value="%nbviewer_cookbook%/panel_border.ipynb"/>
109+
<var name="nb-param_width_unit" value="%nbviewer_cookbook%/param_width_unit.ipynb"/>
107110
<var name="nb-plot_grid" value="%nbviewer_cookbook%/plot_grid.ipynb"/>
108111
<var name="nb-position_stack" value="%nbviewer_cookbook%/position_stack.ipynb"/>
109112
<var name="nb-projection_provided" value="%nbviewer_cookbook%/projection_provided.ipynb"/>

future_changes.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ GeoTools [v 32.1](https://github.com/geotools/geotools/releases/tag/32.0)
66
### Added
77

88
- Geometries:
9+
910
- `geomHex()` [[#556](https://github.com/JetBrains/lets-plot/issues/556)].
1011

1112
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)
1920
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).
2021

2122
- Texts and labels:
23+
2224
- `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)].
2325

24-
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/master/docs/examples/jupyter-notebooks/f-4.10.0/axis_label_justification.ipynb).
26+
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).
2527

2628
- multiline support for axis labels [[#948](https://github.com/JetBrains/lets-plot/issues/948)].
2729

28-
See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/master/docs/examples/jupyter-notebooks/f-4.10.0/multiline_axis_labels.ipynb).
30+
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).
2931

3032
- Markdown support for plot **title**, **subtitle**, **caption**, and axis labels [[#1256](https://github.com/JetBrains/lets-plot/issues/1256)].
3133

3234
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/f-4.10.0/markdown.ipynb).
35+
3336
### Changed
3437

3538
- [**BREAKING**] The `height` parameter has been deprecated for the `geomErrorBar`.

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_errorbar.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
7070
* For more info see: [aesthetics.html#line-types](https://lets-plot.org/kotlin/aesthetics.html#line-types).
7171
* @param size Line width.
7272
* @param widthUnit default = "res".
73-
* Unit for the whisker width of the vertical error bar.
73+
* Unit for the whisker width of the error bar.
7474
* Possible values:
7575
*
7676
* - "res": the unit equals the smallest distance between adjacent error bars along the corresponding axis;

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_hex.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
2525
* To hide axis tooltips, set "blank" or the result of `elementBlank()`
2626
* to the `axisTooltip`, `axisTooltipX` or `axisTooltipY` parameter of the `theme()`.
2727
*
28+
* ## Examples
29+
*
30+
* - [geom_hex.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_hex.ipynb)
31+
*
2832
* @param data The data to be displayed in this layer. If null, the default, the data is inherited from the plot
2933
* data as specified in the call to [letsPlot][org.jetbrains.letsPlot.letsPlot].
30-
* @param stat default = `Stat.binhex()`. The statistical transformation to use on the data for this layer.
34+
* @param stat default = `Stat.binhex()`.
35+
* The statistical transformation to use on the data for this layer.
3136
* Supported transformations: `Stat.identity`, `Stat.bin()`, `Stat.count()`, etc. see [Stat][org.jetbrains.letsPlot.Stat].
3237
* @param position Position adjustment: `positionIdentity`, `positionStack()`, `positionDodge()`, etc. see
3338
* [Position](https://lets-plot.org/kotlin/-lets--plot--kotlin/org.jetbrains.letsPlot.pos/).

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/geom/geom_pie.kt

+5-3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ import org.jetbrains.letsPlot.tooltips.TooltipOptions
4949
*
5050
* - [geom_pie_size_unit.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_pie_size_unit.ipynb)
5151
*
52+
* - [geom_pie_params.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/geom_pie_params.ipynb)
53+
*
5254
* @param data The data to be displayed in this layer. If null, the default, the data
5355
* is inherited from the plot data as specified in the call to [letsPlot][org.jetbrains.letsPlot.letsPlot].
5456
* @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
106108
* @param spacerColor Color for spacers between sectors. By default, the "paper" color is used.
107109
* For more info see: [aesthetics.html#color-and-fill](https://lets-plot.org/kotlin/aesthetics.html#color-and-fill).
108110
* @param start Specify the angle at which the first sector starts. Accept values between 0 and 360.
109-
* Default is a negative angle of the first sector.
110-
* @param direction Specify angle direction, 1=clockwise, -1=counter-clockwise.
111-
* Default is 1.
111+
* Default is a negative angle of the first sector.
112+
* @param direction default = 1.
113+
* Specify angle direction, 1=clockwise, -1=counter-clockwise.
112114
* @param sizeUnit Relates the size of the pie chart to the length of the unit step along one of the axes.
113115
* Possible values: "x", "y". If not specified, no fitting is performed.
114116
* @param fillBy default = "fill" ("fill", "color", "paint_a", "paint_b", "paint_c").

plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/themes/theme.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,7 @@ fun elementText(
613613
*
614614
* ## Examples
615615
*
616-
* - [themes.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/themes.ipynb)
617-
*
618-
* - [axis_text_angle.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/axis_text_angle.ipynb)
616+
* - [markdown.ipynb](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/markdown.ipynb)
619617
*
620618
* @param color Text color. Accepts color core as string (HEX or rgb) or Color object.
621619
* @param family Font family.

0 commit comments

Comments
 (0)