{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "9324701a-df5f-47c2-83c8-0e5a9849bdd2", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:25.471261Z", "iopub.status.busy": "2024-12-17T13:35:25.469193Z", "iopub.status.idle": "2024-12-17T13:35:27.401040Z", "shell.execute_reply": "2024-12-17T13:35:27.400307Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%useLatestDescriptors\n", "%use lets-plot" ] }, { "cell_type": "code", "execution_count": 2, "id": "58fe2f92-6711-4096-b4d1-e566a12c81f1", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:27.404038Z", "iopub.status.busy": "2024-12-17T13:35:27.403829Z", "iopub.status.idle": "2024-12-17T13:35:27.451562Z", "shell.execute_reply": "2024-12-17T13:35:27.451685Z" } }, "outputs": [ { "data": { "text/plain": [ "Lets-Plot Kotlin API v.4.9.3. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.5.2." ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "LetsPlot.getInfo()" ] }, { "cell_type": "code", "execution_count": 3, "id": "82bffdd3-fca2-46bd-b4cd-b3e27ede27e0", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:27.453503Z", "iopub.status.busy": "2024-12-17T13:35:27.453286Z", "iopub.status.idle": "2024-12-17T13:35:27.486068Z", "shell.execute_reply": "2024-12-17T13:35:27.485796Z" } }, "outputs": [], "source": [ "import org.jetbrains.letsPlot.intern.Feature" ] }, { "cell_type": "code", "execution_count": 4, "id": "27fb7202-f86c-4ff7-a3be-fbfbb138b9cd", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:27.488457Z", "iopub.status.busy": "2024-12-17T13:35:27.488242Z", "iopub.status.idle": "2024-12-17T13:35:27.519098Z", "shell.execute_reply": "2024-12-17T13:35:27.518831Z" } }, "outputs": [], "source": [ "val colorMargin = \"#b3cde3\"\n", "val colorKey = \"#decbe4\"\n", "val colorLabel = \"#fddaec\"\n", "val colorPlot = \"#ccebc5\"" ] }, { "cell_type": "code", "execution_count": 5, "id": "3f3dd770-6484-4c25-961f-358f06f864d0", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:27.521839Z", "iopub.status.busy": "2024-12-17T13:35:27.521030Z", "iopub.status.idle": "2024-12-17T13:35:27.953276Z", "shell.execute_reply": "2024-12-17T13:35:27.953014Z" } }, "outputs": [], "source": [ "data class Bounds(val xmin: Double, val ymin: Double, val xmax: Double, val ymax: Double)\n", "\n", "fun legendElement(b: Bounds): Feature {\n", " return geomRect(xmin = b.xmin, xmax = b.xmax, ymin = b.ymin, ymax = b.ymax,\n", " fill = colorLabel, color = colorLabel, size = 0) +\n", " geomRect(xmin = b.xmin, xmax = b.xmin + 1.5, ymin = b.ymin, ymax = b.ymax,\n", " fill = colorKey, color = colorKey, size = 0) +\n", " geomText(x = b.xmin + 0.1, y = (b.ymin + b.ymax) / 2.0,\n", " label = \"key\", vjust = 0.5, hjust = 0.0, size = 10) +\n", " geomText(x = b.xmin + 1.6, y = (b.ymin + b.ymax) / 2.0,\n", " label = \"label\", vjust = 0.5, hjust = 0.0, size = 10)\n", "}\n", "\n", "fun legend(x: Double, y: Double, w: Double, h: Double): Feature {\n", " val xmin = x\n", " val xmax = x + w\n", " val ymin = y\n", " val ymax = ymin + h\n", "\n", " val margin = 1.0\n", " val space = 1.0\n", " val titleH = 1.5\n", " val elemW = ((w - margin * 2.0) - space) / 2.0\n", " val elemH = ((h - margin * 2.0)) / 2.0 - space - 0.2\n", "\n", " // elements bounds\n", " val innerBounds = Bounds(xmin + margin, ymin + margin,\n", " xmax - margin, ymax - margin)\n", " val elem11 = Bounds(innerBounds.xmin, innerBounds.ymax - titleH - elemH,\n", " innerBounds.xmin + elemW, innerBounds.ymax - titleH)\n", " val elem12 = Bounds(innerBounds.xmin + elemW + space, innerBounds.ymax - titleH - elemH,\n", " innerBounds.xmax, innerBounds.ymax - titleH)\n", " val elem21 = Bounds(elem11.xmin, innerBounds.ymin, elem11.xmax, innerBounds.ymin + elemH)\n", " val elem22 = Bounds(elem12.xmin, innerBounds.ymin, innerBounds.xmax, elem21.ymax)\n", "\n", " // plot elements\n", " val legendBackground = geomRect(xmin = xmin, xmax = xmax,\n", " ymin = ymin, ymax = ymax,\n", " fill = colorMargin, size = 1.5)\n", " val legendElementsBox = geomRect(xmin = innerBounds.xmin, xmax = innerBounds.xmax,\n", " ymin = innerBounds.ymin, ymax = innerBounds.ymax,\n", " fill = \"white\", size = 0)\n", " val title = geomText(label = \"Title\",\n", " x = innerBounds.xmin + 0.1, y = innerBounds.ymax - titleH / 2.0,\n", " vjust = 0.5, hjust = 0, size = 10)\n", " val row1 = legendElement(elem11) + legendElement(elem12)\n", " val row2 = legendElement(elem21) + legendElement(elem22)\n", " \n", " return legendBackground + legendElementsBox + title + row1 + row2\n", "}\n", "\n", "fun annotationLine(x: Double, y: Double, xend: Double? = null, yend: Double? = null,\n", " typeArrow: String? = \"both\", linetype: String = \"solid\"): Feature {\n", " val xend: Double = xend ?: x\n", " val yend: Double = yend ?: y\n", " val withArrow: Map? = typeArrow?.let { ends ->\n", " arrow(length = 5, ends = ends, type = \"closed\")\n", " }\n", " return geomSegment(x = x, y = y, xend = xend, yend = yend, linetype = linetype, arrow = withArrow)\n", "}" ] }, { "cell_type": "code", "execution_count": 6, "id": "e22d5992-2b66-4e49-b147-f23046bc93c4", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:27.955722Z", "iopub.status.busy": "2024-12-17T13:35:27.955052Z", "iopub.status.idle": "2024-12-17T13:35:28.060433Z", "shell.execute_reply": "2024-12-17T13:35:28.060133Z" } }, "outputs": [], "source": [ "val plottingArea = geomRect(xmin = 0, xmax = 3, ymin = -1, ymax = 19,\n", " fill = colorPlot, color = colorMargin,\n", " size = 14, alpha = 0.5) +\n", " geomText(label = \"plotting area\", x = 2, y = 10,\n", " hjust = 0.5, vjust = 0, angle = 90, size = 11, color = \"grey\") +\n", " geomText(label = \"plotInset\", x = 2.8, y = 10,\n", " hjust = 0.5, vjust = 1, angle = 90, family = \"Courier\")\n", "val legendBoxSpacing = geomText(label = \"legendBoxSpacing\", x = 4.2, y = 10.5,\n", " hjust = 0, vjust = 0, angle = 90, family = \"Courier\") +\n", " annotationLine(x = 3.3, y = 10.2, xend = 5.0)\n", "val legendBoxes = legend(x = 5.0, y = 10.0, w = 15.0, h = 8.5) +\n", " legend(x = 5.0, y = 0.0, w = 12.0, h = 8.5) +\n", " geomText(label = \"legendJustification(0, 1)\", x = 23, y = 19,\n", " hjust = 1, vjust = 0, family = \"Courier\") +\n", " annotationLine(x = -1.0, y = 18.5, xend = 22.0, typeArrow = null, linetype = \"dashed\")\n", "val legendAnnotations = geomText(label = \"legendMargin\", x = 15, y = 18, hjust = 0, family = \"Courier\") +\n", " geomText(label = \"legendSpacingY\", x = 6, y = 9.2, hjust = 0, family = \"Courier\") +\n", " annotationLine(x = 5.4, y = 8.5, yend = 10.0) +\n", " geomText(label = \"legendKeySpacingX\", x = 12.8, y = 9.2, hjust = 0, family = \"Courier\") +\n", " annotationLine(x = 12.0, y = 11.5, xend = 13.0) +\n", " annotationLine(x = 12.5, y = 9.2, yend = 11.5, typeArrow = null) +\n", " geomText(label = \"legendKeySpacingY\", x = 14, y = 13.5, hjust = 0, family = \"Courier\") +\n", " annotationLine(x = 13.8, y = 13.1, yend = 13.9) +\n", " geomText(label = \"legendBoxJustificationLeft() (legendBoxVertical())\",\n", " x = 5.3, y = -1, hjust = 0, family = \"Courier\") +\n", " annotationLine(x = 5.0, y = -2.0, yend = 20.0, typeArrow = null, linetype = \"dashed\") +\n", " geomText(label = \"legendKeyWidth\", x = 12, y = 7, hjust = 0, family = \"Courier\") +\n", " annotationLine(x = 11.5, y = 6.5, xend = 13.0) +\n", " geomText(label = \"legendKeyHeight\", x = 10.5, y = 3.5, hjust = 0, family = \"Courier\") +\n", " annotationLine(x = 11.2, y = 4.0, yend = 5.9)" ] }, { "cell_type": "code", "execution_count": 7, "id": "ca5bfaba-4c5c-4280-9169-dc1fb0290fd7", "metadata": { "execution": { "iopub.execute_input": "2024-12-17T13:35:28.062362Z", "iopub.status.busy": "2024-12-17T13:35:28.062006Z", "iopub.status.idle": "2024-12-17T13:35:28.335143Z", "shell.execute_reply": "2024-12-17T13:35:28.335026Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/plot+json": { "apply_color_scheme": true, "output": { "coord": { "flip": false, "name": "cartesian", "xlim": [ 1.2, 23.0 ] }, "ggsize": { "height": 800.0, "width": 1000.0 }, "kind": "plot", "layers": [ { "alpha": 0.5, "color": "#b3cde3", "fill": "#ccebc5", "geom": "rect", "mapping": {}, "position": "identity", "size": 14.0, "stat": "identity", "xmax": 3.0, "xmin": 0.0, "ymax": 19.0, "ymin": -1.0 }, { "angle": 90.0, "color": "grey", "geom": "text", "hjust": 0.5, "label": "plotting area", "mapping": {}, "position": "identity", "size": 11.0, "stat": "identity", "vjust": 0.0, "x": 2.0, "y": 10.0 }, { "angle": 90.0, "family": "Courier", "geom": "text", "hjust": 0.5, "label": "plotInset", "mapping": {}, "position": "identity", "stat": "identity", "vjust": 1.0, "x": 2.8, "y": 10.0 }, { "angle": 90.0, "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendBoxSpacing", "mapping": {}, "position": "identity", "stat": "identity", "vjust": 0.0, "x": 4.2, "y": 10.5 }, { "arrow": { "ends": "both", "length": 5.0, "name": "arrow", "type": "closed" }, "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 3.3, "xend": 5.0, "y": 10.2, "yend": 10.2 }, { "fill": "#b3cde3", "geom": "rect", "mapping": {}, "position": "identity", "size": 1.5, "stat": "identity", "xmax": 20.0, "xmin": 5.0, "ymax": 18.5, "ymin": 10.0 }, { "fill": "white", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 19.0, "xmin": 6.0, "ymax": 17.5, "ymin": 11.0 }, { "geom": "text", "hjust": 0.0, "label": "Title", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 6.1, "y": 16.75 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 12.0, "xmin": 6.0, "ymax": 16.0, "ymin": 13.95 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 7.5, "xmin": 6.0, "ymax": 16.0, "ymin": 13.95 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 6.1, "y": 14.975 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 7.6, "y": 14.975 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 19.0, "xmin": 13.0, "ymax": 16.0, "ymin": 13.95 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 14.5, "xmin": 13.0, "ymax": 16.0, "ymin": 13.95 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 13.1, "y": 14.975 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 14.6, "y": 14.975 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 12.0, "xmin": 6.0, "ymax": 13.05, "ymin": 11.0 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 7.5, "xmin": 6.0, "ymax": 13.05, "ymin": 11.0 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 6.1, "y": 12.025 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 7.6, "y": 12.025 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 19.0, "xmin": 13.0, "ymax": 13.05, "ymin": 11.0 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 14.5, "xmin": 13.0, "ymax": 13.05, "ymin": 11.0 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 13.1, "y": 12.025 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 14.6, "y": 12.025 }, { "fill": "#b3cde3", "geom": "rect", "mapping": {}, "position": "identity", "size": 1.5, "stat": "identity", "xmax": 17.0, "xmin": 5.0, "ymax": 8.5, "ymin": 0.0 }, { "fill": "white", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 16.0, "xmin": 6.0, "ymax": 7.5, "ymin": 1.0 }, { "geom": "text", "hjust": 0.0, "label": "Title", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 6.1, "y": 6.75 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 10.5, "xmin": 6.0, "ymax": 6.0, "ymin": 3.95 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 7.5, "xmin": 6.0, "ymax": 6.0, "ymin": 3.95 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 6.1, "y": 4.975 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 7.6, "y": 4.975 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 16.0, "xmin": 11.5, "ymax": 6.0, "ymin": 3.95 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 13.0, "xmin": 11.5, "ymax": 6.0, "ymin": 3.95 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 11.6, "y": 4.975 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 13.1, "y": 4.975 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 10.5, "xmin": 6.0, "ymax": 3.05, "ymin": 1.0 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 7.5, "xmin": 6.0, "ymax": 3.05, "ymin": 1.0 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 6.1, "y": 2.025 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 7.6, "y": 2.025 }, { "color": "#fddaec", "fill": "#fddaec", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 16.0, "xmin": 11.5, "ymax": 3.05, "ymin": 1.0 }, { "color": "#decbe4", "fill": "#decbe4", "geom": "rect", "mapping": {}, "position": "identity", "size": 0.0, "stat": "identity", "xmax": 13.0, "xmin": 11.5, "ymax": 3.05, "ymin": 1.0 }, { "geom": "text", "hjust": 0.0, "label": "key", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 11.6, "y": 2.025 }, { "geom": "text", "hjust": 0.0, "label": "label", "mapping": {}, "position": "identity", "size": 10.0, "stat": "identity", "vjust": 0.5, "x": 13.1, "y": 2.025 }, { "family": "Courier", "geom": "text", "hjust": 1.0, "label": "legendJustification(0, 1)", "mapping": {}, "position": "identity", "stat": "identity", "vjust": 0.0, "x": 23.0, "y": 19.0 }, { "geom": "segment", "linetype": "dashed", "mapping": {}, "position": "identity", "stat": "identity", "x": -1.0, "xend": 22.0, "y": 18.5, "yend": 18.5 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendMargin", "mapping": {}, "position": "identity", "stat": "identity", "x": 15.0, "y": 18.0 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendSpacingY", "mapping": {}, "position": "identity", "stat": "identity", "x": 6.0, "y": 9.2 }, { "arrow": { "ends": "both", "length": 5.0, "name": "arrow", "type": "closed" }, "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 5.4, "xend": 5.4, "y": 8.5, "yend": 10.0 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendKeySpacingX", "mapping": {}, "position": "identity", "stat": "identity", "x": 12.8, "y": 9.2 }, { "arrow": { "ends": "both", "length": 5.0, "name": "arrow", "type": "closed" }, "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 12.0, "xend": 13.0, "y": 11.5, "yend": 11.5 }, { "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 12.5, "xend": 12.5, "y": 9.2, "yend": 11.5 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendKeySpacingY", "mapping": {}, "position": "identity", "stat": "identity", "x": 14.0, "y": 13.5 }, { "arrow": { "ends": "both", "length": 5.0, "name": "arrow", "type": "closed" }, "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 13.8, "xend": 13.8, "y": 13.1, "yend": 13.9 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendBoxJustificationLeft() (legendBoxVertical())", "mapping": {}, "position": "identity", "stat": "identity", "x": 5.3, "y": -1.0 }, { "geom": "segment", "linetype": "dashed", "mapping": {}, "position": "identity", "stat": "identity", "x": 5.0, "xend": 5.0, "y": -2.0, "yend": 20.0 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendKeyWidth", "mapping": {}, "position": "identity", "stat": "identity", "x": 12.0, "y": 7.0 }, { "arrow": { "ends": "both", "length": 5.0, "name": "arrow", "type": "closed" }, "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 11.5, "xend": 13.0, "y": 6.5, "yend": 6.5 }, { "family": "Courier", "geom": "text", "hjust": 0.0, "label": "legendKeyHeight", "mapping": {}, "position": "identity", "stat": "identity", "x": 10.5, "y": 3.5 }, { "arrow": { "ends": "both", "length": 5.0, "name": "arrow", "type": "closed" }, "geom": "segment", "linetype": "solid", "mapping": {}, "position": "identity", "stat": "identity", "x": 11.2, "xend": 11.2, "y": 4.0, "yend": 5.9 } ], "mapping": {}, "scales": [], "theme": { "axis": { "blank": true }, "line": { "blank": true }, "name": "classic" } }, "output_type": "lets_plot_spec", "swing_enabled": true }, "text/html": [ "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " plotting area\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " plotInset\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendBoxSpacing\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " Title\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " Title\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " key\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " label\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendJustification(0, 1)\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendMargin\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendSpacingY\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendKeySpacingX\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendKeySpacingY\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendBoxJustificationLeft() (legendBoxVertical())\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendKeyWidth\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " legendKeyHeight\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "\n", " " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "letsPlot() +\n", " plottingArea +\n", " legendBoxSpacing +\n", " legendBoxes +\n", " legendAnnotations +\n", " coordCartesian(xlim = Pair(1.2, 23)) +\n", " themeVoid() +\n", " ggsize(1000, 800)" ] } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "language_info": { "codemirror_mode": "text/x-kotlin", "file_extension": ".kt", "mimetype": "text/x-kotlin", "name": "kotlin", "nbconvert_exporter": "", "pygments_lexer": "kotlin", "version": "1.9.23" } }, "nbformat": 4, "nbformat_minor": 5 }