Skip to content
Merged
4 changes: 3 additions & 1 deletion Writerside/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<variables>
<custom-css>custom.css</custom-css>
</variables>
<variables>
<web-root>https://lets-plot.org</web-root>
<header-logo>logo-dark.svg</header-logo>
Expand All @@ -10,7 +13,6 @@
<algolia-index>lets-plot-kotlin</algolia-index>
<algolia-api-key>c281e6fa402631930df5a4d5baf863c5</algolia-api-key>
</variables>

<footer>
<copyright>2019-%current_year% JetBrains s.r.o.</copyright>
</footer>
Expand Down
426 changes: 426 additions & 0 deletions Writerside/cfg/static/custom.css

Large diffs are not rendered by default.

Binary file added Writerside/images/plots/named_colors_example.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/lpk.tree
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<toc-element topic="charts.md"/>
<toc-element toc-title="Key Features">
<toc-element topic="aesthetics.md"/>
<toc-element topic="named_colors.md"/>
<toc-element topic="as_discrete.md"/>
<toc-element topic="multiplot.md"/>
<toc-element topic="bistro.md"/>
Expand All @@ -22,6 +23,7 @@
<toc-element topic="formats.md"/>
<toc-element topic="sampling.md"/>
<toc-element topic="export.md"/>
<toc-element topic="latex.md"/>
<toc-element topic="misc.md"/>
</toc-element>
</instance-profile>
60 changes: 29 additions & 31 deletions Writerside/topics/aesthetics.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
# Aesthetics

## Color and Fill

Colors and fills of geometries can be specified in the following ways:

- RGB/RGBA (e.g. `"rgb(0, 0, 255)"`, `"rgba(0, 0, 255, 0.5)"`).

- 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)

- A system color name, one of:

<list columns="3">
<li>
<img alt="Color 'pen'" src="aesthetics_color_pen.png"/>
</li>
<li>
<img alt="Color 'brush'" src="aesthetics_color_brush.png"/>
</li>
<li>
<img alt="Color 'paper'" src="aesthetics_color_paper.png"/>
</li>
</list>

- An instance of the `java.awt.Color` class.

## Point Shapes

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

![Font faces](aesthetics_font_face.png)

The default font face is `'plain'`.
The default font face is `'plain'`.

## Color and Fill

Colors and fills of geometries can be specified in the following ways:

- **RGB**/**RGBA** - e.g. `"rgb(0, 0, 255)"`, `"rgba(0, 0, 255, 0.5)"`.

- **HEX** - e.g. `"#0077ff"`, `"#07f"`.

- **Transparent** - an empty string (`""`) or the aliases `"blank"` and `"transparent"` for a fully transparent color.

- **Named colors** from <a href="named_colors.md">a predefined list of color names</a>.

- **System colors** depending on the current theme <a href="presentation_options.md#color-schemes-flavors">flavor</a>, one of:

<list columns="3">
<li>
<img alt="Color 'pen'" src="aesthetics_color_pen.png"/>
</li>
<li>
<img alt="Color 'brush'" src="aesthetics_color_brush.png"/>
</li>
<li>
<img alt="Color 'paper'" src="aesthetics_color_paper.png"/>
</li>
</list>

- An instance of the `java.awt.Color` class.
17 changes: 16 additions & 1 deletion Writerside/topics/charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Data in this format is sometimes referred to as tidy data, flat data, primary da

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

## Aesthetics

- <a href="aesthetics.md#point-shapes">Point shapes</a>

- <a href="aesthetics.md#line-types">Line types</a>

- <a href="aesthetics.md#color-and-fill">Color and fill</a>

- <a href="named_colors.md">Named colors reference</a>

- <a href="aesthetics.md#text">Text</a>

## Basic Building Blocks

Points:
Expand Down Expand Up @@ -43,7 +55,9 @@ Tiles:

Text:
[`text`](%api_geom%/geom-text/index.html),
[`label`](%api_geom%/geom-label/index.html)
[`text repel`](%api_geom%/geom-text-repel/index.html),
[`label`](%api_geom%/geom-label/index.html),
[`label repel`](%api_geom%/geom-label-repel/index.html)

Examples:

Expand Down Expand Up @@ -103,6 +117,7 @@ Examples:
[`dotplot`](%api_geom%/geom-dotplot/index.html),
[`y-dotplot`](%api_geom%/geom-y-dotplot/index.html),
[`violin`](%api_geom%/geom-violin/index.html),
[`sina`](%api_geom%/geom-sina/index.html),
[`ridgeline`](%api_geom%/geom-area-ridges/index.html),
[`frequency polygon`](%api_geom%/geom-freqpoly/index.html)

Expand Down
14 changes: 14 additions & 0 deletions Writerside/topics/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ The list of supported directives to format date/time values:
- `%P` - like %p but in lowercase: "am" or "pm";
- `%S` - second as a zero-padded decimal number (00, 01, …, 59).

<note>
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.
</note>

### Datetime Format Examples

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

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

### Axis Tooltips

To format the axis tooltips, follow the rules:

- the scale's `format` parameter is applied to tick labels only and does not affect tooltips;

- the [`format()`](%api_tooltips%/layer-tooltips/format.html) method of [`layerTooltips()`](%api_tooltips%/layer-tooltips/index.html) is also applied to the axis tooltip;

- 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).

## Annotating Charts

You can format text in annotations, see: [Annotating Charts](annotations.md).
Expand Down
128 changes: 128 additions & 0 deletions Writerside/topics/latex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# LaTeX Support

Lets-Plot has limited support for the LaTeX formulas. See examples below.

## Superscript and Subscript

``2^5`` → 2<sup>5</sup>

``2^{10}`` → 2<sup>10</sup>

``2^{-5}`` → 2<sup>−5</sup>

``x_i`` → x<sub>i</sub>

``x_{min}`` → x<sub>min</sub>

## Greek Letters

<table>
<tr></tr>
<tr>
<td>Α \Alpha</td>
<td>Ν \Nu</td>
<td>α \alpha</td>
<td>ν \nu</td>
</tr>
<tr>
<td>Β \Beta</td>
<td>Ξ \Xi</td>
<td>β \beta</td>
<td>ξ \xi</td>
</tr>
<tr>
<td>Γ \Gamma</td>
<td>Ο \Omicron</td>
<td>γ \gamma</td>
<td>ο \omicron</td>
</tr>
<tr>
<td>Δ \Delta</td>
<td>Π \Pi</td>
<td>δ \delta</td>
<td>π \pi</td>
</tr>
<tr>
<td>Ε \Epsilon</td>
<td>Ρ \Rho</td>
<td>ε \epsilon</td>
<td>ρ \rho</td>
</tr>
<tr>
<td>Ζ \Zeta</td>
<td>Σ \Sigma</td>
<td>ζ \zeta</td>
<td>σ \sigma</td>
</tr>
<tr>
<td>Η \Eta</td>
<td>Τ \Tau</td>
<td>η \eta</td>
<td>τ \tau</td>
</tr>
<tr>
<td>Θ \Theta</td>
<td>Υ \Upsilon</td>
<td>θ \theta</td>
<td>υ \upsilon</td>
</tr>
<tr>
<td>Ι \Iota</td>
<td>Φ \Phi</td>
<td>ι \iota</td>
<td>φ \phi</td>
</tr>
<tr>
<td>Κ \Kappa</td>
<td>Χ \Chi</td>
<td>κ \kappa</td>
<td>χ \chi</td>
</tr>
<tr>
<td>Λ \Lambda</td>
<td>Ψ \Psi</td>
<td>λ \lambda</td>
<td>ψ \psi</td>
</tr>
<tr>
<td>Μ \Mu</td>
<td>Ω \Omega</td>
<td>μ \mu</td>
<td>ω \omega</td>
</tr>
</table>

## Some Special Symbols

<table>
<tr></tr>
<tr>
<td>∞ \infty</td>
<td>× \times</td>
<td>≤ \leq</td>
</tr>
<tr>
<td>± \pm</td>
<td>÷ \div</td>
<td>≥ \geq</td>
</tr>
<tr>
<td>∓ \mp</td>
<td>· \cdot</td>
<td>≠ \neq</td>
</tr>
</table>

## Spacing

``A B`` → AB

``A \quad B`` → A B

``A \qquad B`` → A  B

``A \, B`` → A B

``A \: B`` → A B

``A \ B`` → A B
2 changes: 2 additions & 0 deletions Writerside/topics/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ In tooltips/labels/texts and wherever else there is text, you can use:
- Greek letters, e.g. `\( \Omega \)`, and
- some special symbols, e.g. `\( a \cdot b \neq c \)`.

Learn more: <a href="latex.md">LaTeX Support</a>.

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

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