Skip to content

Commit 3e8aa4d

Browse files
Updates on the documentation pages (#280)
1 parent 9f6c780 commit 3e8aa4d

File tree

10 files changed

+2706
-33
lines changed

10 files changed

+2706
-33
lines changed

Writerside/cfg/buildprofiles.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<variables>
4+
<custom-css>custom.css</custom-css>
5+
</variables>
36
<variables>
47
<web-root>https://lets-plot.org</web-root>
58
<header-logo>logo-dark.svg</header-logo>
@@ -10,7 +13,6 @@
1013
<algolia-index>lets-plot-kotlin</algolia-index>
1114
<algolia-api-key>c281e6fa402631930df5a4d5baf863c5</algolia-api-key>
1215
</variables>
13-
1416
<footer>
1517
<copyright>2019-%current_year% JetBrains s.r.o.</copyright>
1618
</footer>

Writerside/cfg/static/custom.css

Lines changed: 426 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
17.6 KB
Loading

Writerside/lpk.tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<toc-element topic="charts.md"/>
1313
<toc-element toc-title="Key Features">
1414
<toc-element topic="aesthetics.md"/>
15+
<toc-element topic="named_colors.md"/>
1516
<toc-element topic="as_discrete.md"/>
1617
<toc-element topic="multiplot.md"/>
1718
<toc-element topic="bistro.md"/>
@@ -22,6 +23,7 @@
2223
<toc-element topic="formats.md"/>
2324
<toc-element topic="sampling.md"/>
2425
<toc-element topic="export.md"/>
26+
<toc-element topic="latex.md"/>
2527
<toc-element topic="misc.md"/>
2628
</toc-element>
2729
</instance-profile>

Writerside/topics/aesthetics.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
# Aesthetics
22

3-
## Color and Fill
4-
5-
Colors and fills of geometries can be specified in the following ways:
6-
7-
- RGB/RGBA (e.g. `"rgb(0, 0, 255)"`, `"rgba(0, 0, 255, 0.5)"`).
8-
9-
- HEX (e.g. `"#0000ff"`, `"#00f"`).
10-
11-
- Blank string (`""`) or aliases: `"blank"`, `"transparent"` for a fully transparent color.
12-
13-
- A name, one of:
14-
15-
![Color names](aesthetics_color.png)
16-
17-
- A system color name, one of:
18-
19-
<list columns="3">
20-
<li>
21-
<img alt="Color 'pen'" src="aesthetics_color_pen.png"/>
22-
</li>
23-
<li>
24-
<img alt="Color 'brush'" src="aesthetics_color_brush.png"/>
25-
</li>
26-
<li>
27-
<img alt="Color 'paper'" src="aesthetics_color_paper.png"/>
28-
</li>
29-
</list>
30-
31-
- An instance of the `java.awt.Color` class.
32-
333
## Point Shapes
344

355
![Point shapes](aesthetics_shape.png)
@@ -66,4 +36,32 @@ You can also use the name of any other font installed on your system (e.g. `"Tim
6636

6737
![Font faces](aesthetics_font_face.png)
6838

69-
The default font face is `'plain'`.
39+
The default font face is `'plain'`.
40+
41+
## Color and Fill
42+
43+
Colors and fills of geometries can be specified in the following ways:
44+
45+
- **RGB**/**RGBA** - e.g. `"rgb(0, 0, 255)"`, `"rgba(0, 0, 255, 0.5)"`.
46+
47+
- **HEX** - e.g. `"#0077ff"`, `"#07f"`.
48+
49+
- **Transparent** - an empty string (`""`) or the aliases `"blank"` and `"transparent"` for a fully transparent color.
50+
51+
- **Named colors** from <a href="named_colors.md">a predefined list of color names</a>.
52+
53+
- **System colors** depending on the current theme <a href="presentation_options.md#color-schemes-flavors">flavor</a>, one of:
54+
55+
<list columns="3">
56+
<li>
57+
<img alt="Color 'pen'" src="aesthetics_color_pen.png"/>
58+
</li>
59+
<li>
60+
<img alt="Color 'brush'" src="aesthetics_color_brush.png"/>
61+
</li>
62+
<li>
63+
<img alt="Color 'paper'" src="aesthetics_color_paper.png"/>
64+
</li>
65+
</list>
66+
67+
- An instance of the `java.awt.Color` class.

Writerside/topics/charts.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ Data in this format is sometimes referred to as tidy data, flat data, primary da
1010

1111
You can pass tidy data to *Lets-Plot* in form of a Kotlin `Map`.
1212

13+
## Aesthetics
14+
15+
- <a href="aesthetics.md#point-shapes">Point shapes</a>
16+
17+
- <a href="aesthetics.md#line-types">Line types</a>
18+
19+
- <a href="aesthetics.md#color-and-fill">Color and fill</a>
20+
21+
- <a href="named_colors.md">Named colors reference</a>
22+
23+
- <a href="aesthetics.md#text">Text</a>
24+
1325
## Basic Building Blocks
1426

1527
Points:
@@ -43,7 +55,9 @@ Tiles:
4355

4456
Text:
4557
[`text`](%api_geom%/geom-text/index.html),
46-
[`label`](%api_geom%/geom-label/index.html)
58+
[`text repel`](%api_geom%/geom-text-repel/index.html),
59+
[`label`](%api_geom%/geom-label/index.html),
60+
[`label repel`](%api_geom%/geom-label-repel/index.html)
4761

4862
Examples:
4963

@@ -103,6 +117,7 @@ Examples:
103117
[`dotplot`](%api_geom%/geom-dotplot/index.html),
104118
[`y-dotplot`](%api_geom%/geom-y-dotplot/index.html),
105119
[`violin`](%api_geom%/geom-violin/index.html),
120+
[`sina`](%api_geom%/geom-sina/index.html),
106121
[`ridgeline`](%api_geom%/geom-area-ridges/index.html),
107122
[`frequency polygon`](%api_geom%/geom-freqpoly/index.html)
108123

Writerside/topics/formats.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ The list of supported directives to format date/time values:
161161
- `%P` - like %p but in lowercase: "am" or "pm";
162162
- `%S` - second as a zero-padded decimal number (00, 01, …, 59).
163163

164+
<note>
165+
If no timezone information is present (naive datetime), Lets-Plot assumes UTC timezone. For timezone-aware datetime objects, the timezone information from the data is preserved and used for rendering.
166+
</note>
167+
164168
### Datetime Format Examples
165169

166170
Let's apply the format string to the date `Aug 6, 2019` and the time `4:46:35`:
@@ -223,6 +227,16 @@ The following table demonstrates the behavior with format string `",~g"`:
223227

224228
You can format text in tooltips, see: [Tooltip Customization](tooltips.md).
225229

230+
### Axis Tooltips
231+
232+
To format the axis tooltips, follow the rules:
233+
234+
- the scale's `format` parameter is applied to tick labels only and does not affect tooltips;
235+
236+
- the [`format()`](%api_tooltips%/layer-tooltips/format.html) method of [`layerTooltips()`](%api_tooltips%/layer-tooltips/index.html) is also applied to the axis tooltip;
237+
238+
- if the [`format()`](%api_tooltips%/layer-tooltips/format.html) method is not specified, the tooltip will get the value after applying the default formatting from the scale (without using the specified format for the scale).
239+
226240
## Annotating Charts
227241

228242
You can format text in annotations, see: [Annotating Charts](annotations.md).

Writerside/topics/latex.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# LaTeX Support
2+
3+
Lets-Plot has limited support for the LaTeX formulas. See examples below.
4+
5+
## Superscript and Subscript
6+
7+
``2^5`` → 2<sup>5</sup>
8+
9+
``2^{10}`` → 2<sup>10</sup>
10+
11+
``2^{-5}`` → 2<sup>−5</sup>
12+
13+
``x_i`` → x<sub>i</sub>
14+
15+
``x_{min}`` → x<sub>min</sub>
16+
17+
## Greek Letters
18+
19+
<table>
20+
<tr></tr>
21+
<tr>
22+
<td>Α \Alpha</td>
23+
<td>Ν \Nu</td>
24+
<td>α \alpha</td>
25+
<td>ν \nu</td>
26+
</tr>
27+
<tr>
28+
<td>Β \Beta</td>
29+
<td>Ξ \Xi</td>
30+
<td>β \beta</td>
31+
<td>ξ \xi</td>
32+
</tr>
33+
<tr>
34+
<td>Γ \Gamma</td>
35+
<td>Ο \Omicron</td>
36+
<td>γ \gamma</td>
37+
<td>ο \omicron</td>
38+
</tr>
39+
<tr>
40+
<td>Δ \Delta</td>
41+
<td>Π \Pi</td>
42+
<td>δ \delta</td>
43+
<td>π \pi</td>
44+
</tr>
45+
<tr>
46+
<td>Ε \Epsilon</td>
47+
<td>Ρ \Rho</td>
48+
<td>ε \epsilon</td>
49+
<td>ρ \rho</td>
50+
</tr>
51+
<tr>
52+
<td>Ζ \Zeta</td>
53+
<td>Σ \Sigma</td>
54+
<td>ζ \zeta</td>
55+
<td>σ \sigma</td>
56+
</tr>
57+
<tr>
58+
<td>Η \Eta</td>
59+
<td>Τ \Tau</td>
60+
<td>η \eta</td>
61+
<td>τ \tau</td>
62+
</tr>
63+
<tr>
64+
<td>Θ \Theta</td>
65+
<td>Υ \Upsilon</td>
66+
<td>θ \theta</td>
67+
<td>υ \upsilon</td>
68+
</tr>
69+
<tr>
70+
<td>Ι \Iota</td>
71+
<td>Φ \Phi</td>
72+
<td>ι \iota</td>
73+
<td>φ \phi</td>
74+
</tr>
75+
<tr>
76+
<td>Κ \Kappa</td>
77+
<td>Χ \Chi</td>
78+
<td>κ \kappa</td>
79+
<td>χ \chi</td>
80+
</tr>
81+
<tr>
82+
<td>Λ \Lambda</td>
83+
<td>Ψ \Psi</td>
84+
<td>λ \lambda</td>
85+
<td>ψ \psi</td>
86+
</tr>
87+
<tr>
88+
<td>Μ \Mu</td>
89+
<td>Ω \Omega</td>
90+
<td>μ \mu</td>
91+
<td>ω \omega</td>
92+
</tr>
93+
</table>
94+
95+
## Some Special Symbols
96+
97+
<table>
98+
<tr></tr>
99+
<tr>
100+
<td>∞ \infty</td>
101+
<td>× \times</td>
102+
<td>≤ \leq</td>
103+
</tr>
104+
<tr>
105+
<td>± \pm</td>
106+
<td>÷ \div</td>
107+
<td>≥ \geq</td>
108+
</tr>
109+
<tr>
110+
<td>∓ \mp</td>
111+
<td>· \cdot</td>
112+
<td>≠ \neq</td>
113+
</tr>
114+
</table>
115+
116+
## Spacing
117+
118+
``A B`` → AB
119+
120+
``A \quad B`` → A B
121+
122+
``A \qquad B`` → A  B
123+
124+
``A \, B`` → A B
125+
126+
``A \: B`` → A B
127+
128+
``A \ B`` → A B

Writerside/topics/misc.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ In tooltips/labels/texts and wherever else there is text, you can use:
2727
- Greek letters, e.g. `\( \Omega \)`, and
2828
- some special symbols, e.g. `\( a \cdot b \neq c \)`.
2929

30+
Learn more: <a href="latex.md">LaTeX Support</a>.
31+
3032
See: [latex_support.ipynb](%nb-latex_support%)
3133

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

0 commit comments

Comments
 (0)