|
1 | | -> |
2 | | -> |
3 | | -> |
4 | | -> # Warning: |
5 | | -> This documentation page is outdated. |
6 | | -> |
7 | | -> For up-to-date information, see the [Lets-Plot for Kotlin](https://lets-plot.org/kotlin) documentation website. |
8 | | -> |
9 | | -> |
10 | | -> |
| 1 | +## Lets-Plot Kotlin Documentation |
11 | 2 |
|
| 3 | +* [Get Started | Lets-Plot for Kotlin](https://lets-plot.org/kotlin/get-started.html) |
12 | 4 |
|
13 | | -## Lets-Plot Kotlin API |
14 | | - |
15 | | -* Lets-Plot Kotlin API reference: https://lets-plot.org/kotlin |
16 | | - |
17 | | -* The "Example Notebooks" reference: [kotlin_examples/](https://nbviewer.org/github/JetBrains/lets-plot-docs/tree/master/source/kotlin_examples/) |
18 | | - |
19 | | -* Example notebooks in the Binder: [mybinder.org](https://mybinder.org/v2/gh/JetBrains/lets-plot-kotlin/HEAD?labpath=docs%2Fexamples%2Fjupyter-notebooks) |
20 | | - |
21 | | - |
22 | | -<a id="toc"></a> |
23 | | -### Table of Contents |
24 | | - |
25 | | -- [Tooltip Customization](#tooltip-customization) |
26 | | -- [Formatting](#formatting) |
27 | | -- [Data Sampling](#sampling) |
28 | | -- [Saving Plot in a File](#export) |
29 | | -- [GeoTools Support](#geotools) |
30 | | - |
31 | | - |
32 | | -<a id="tooltip-customization"></a> |
33 | | -### Tooltip Customization |
34 | | - |
35 | | -You can customize the content, values formatting and appearance of tooltip for any geometry layer in your plot. |
36 | | - |
37 | | -Learn more: [Tooltip Customization](https://lets-plot.org/kotlin/tooltips.html). |
38 | | - |
39 | | -<a id="formatting"></a> |
40 | | -### Formatting |
41 | | - |
42 | | -Formatting of numeric and date-time values in tooltips, legends, on the axes and *text geometry* layer. |
43 | | - |
44 | | -Learn more: [Formatting](https://lets-plot.org/kotlin/formats.html). |
45 | | - |
46 | | -<a id="sampling"></a> |
47 | | -### Data Sampling |
48 | | - |
49 | | -Sampling is a special technique of data transformation, which helps to deal with large datasets and overplotting. |
50 | | - |
51 | | -Learn more: [Data Sampling](https://lets-plot.org/kotlin/sampling.html). |
52 | | - |
53 | | -<a id="export"></a> |
54 | | -### Saving Plot in a File |
55 | | - |
56 | | -The `ggsave()` function is a convenient way of saving a plot or a GGBunch object in a file. |
57 | | - |
58 | | -The supported export formats are: `SVG, HTML, PNG, JPEG and TIFF`. |
59 | | - |
60 | | -For example, the code below will save plot as a PNG image in the file `<user dir>//lets-plot-images/density.png`: |
61 | | - |
62 | | -```kotlin |
63 | | -val rand = java.util.Random(123) |
64 | | -val n = 400 |
65 | | -val data = mapOf ( |
66 | | - "rating" to List(n/2) { rand.nextGaussian() } + List(n/2) { rand.nextGaussian() * 1.5 + 1.5 }, |
67 | | - "cond" to List(n/2) { "A" } + List(n/2) { "B" } |
68 | | -) |
69 | | - |
70 | | -var p = letsPlot(data) + |
71 | | - geomDensity { x = "rating"; color = "cond" } + ggsize(500, 250) |
72 | | - |
73 | | -ggsave(p, "density.png") |
74 | | -``` |
75 | | - |
76 | | -<img src="https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/images/ggsave_demo.png" alt="Couldn't load ggsave_demo.png" width="500" height="250"/> |
77 | | - |
78 | | -See `ggsave()` [documentation](https://lets-plot.org/kotlin/api-reference/-lets--plot--kotlin/org.jetbrains.letsPlot.export/ggsave.html) |
79 | | -for more information about the function arguments and default values. |
80 | | - |
81 | | -Example notebook: [ggsave demo](https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/kotlin_examples/cookbook/export_to_file.ipynb). |
82 | | - |
83 | | -<a id="geotools"></a> |
84 | | -### GeoTools support |
85 | | - |
86 | | -<img src="https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/images/geotools_thumb.png" alt="geotools_thumb.png" width="74" height="123"/> |
87 | | - |
88 | | -[GeoTools](https://www.geotools.org/) is an open source Java GIS Toolkit. |
89 | | - |
90 | | -Lets-Plot supports visualization of a set of `SimpleFeature`-s stored in `SimpleFeatureCollection`, as well as |
91 | | -individual `Geometry` and `ReferencedEnvelope` objects. |
92 | | - |
93 | | -Learn more: [Geospatial Charts](https://lets-plot.org/kotlin/geospatial-charts.html). |
94 | | - |
| 5 | +* [API reference | Lets-Plot for Kotlin](https://lets-plot.org/kotlin/api-reference/) |
0 commit comments