source/kotlin_examples/cookbook/set_font_faces.ipynb (1,871 lines of code) (raw):

{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "material-professor", "metadata": { "execution": { "iopub.execute_input": "2025-12-03T15:55:32.198200Z", "iopub.status.busy": "2025-12-03T15:55:32.196479Z", "iopub.status.idle": "2025-12-03T15:55:34.130744Z", "shell.execute_reply": "2025-12-03T15:55:34.130479Z" } }, "outputs": [ { "data": { "text/html": [ " <div id=\"vfvwos\"></div>\n", " <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n", " if(!window.letsPlotCallQueue) {\n", " window.letsPlotCallQueue = [];\n", " }; \n", " window.letsPlotCall = function(f) {\n", " window.letsPlotCallQueue.push(f);\n", " };\n", " (function() {\n", " var script = document.createElement(\"script\");\n", " script.type = \"text/javascript\";\n", " script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.8.1/js-package/distr/lets-plot.min.js\";\n", " script.onload = function() {\n", " window.letsPlotCall = function(f) {f();};\n", " window.letsPlotCallQueue.forEach(function(f) {f();});\n", " window.letsPlotCallQueue = [];\n", " \n", " \n", " };\n", " script.onerror = function(event) {\n", " window.letsPlotCall = function(f) {};\n", " window.letsPlotCallQueue = [];\n", " var div = document.createElement(\"div\");\n", " div.style.color = 'darkred';\n", " div.textContent = 'Error loading Lets-Plot JS';\n", " document.getElementById(\"vfvwos\").appendChild(div);\n", " };\n", " var e = document.getElementById(\"vfvwos\");\n", " e.appendChild(script);\n", " })();\n", " </script>" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " <div id=\"kotlin_out_0\"></div>\n", " <script type=\"text/javascript\">\n", " if(!window.kotlinQueues) {\n", " window.kotlinQueues = {};\n", " }\n", " if(!window.kotlinQueues[\"letsPlotJs\"]) {\n", " var resQueue = [];\n", " window.kotlinQueues[\"letsPlotJs\"] = resQueue;\n", " window[\"call_letsPlotJs\"] = function(f) {\n", " resQueue.push(f);\n", " }\n", " }\n", " (function (){\n", " var modifiers = [(function(script) {\n", " script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.8.1/js-package/distr/lets-plot.min.js\"\n", " script.type = \"text/javascript\";\n", "})];\n", " var e = document.getElementById(\"kotlin_out_0\");\n", " modifiers.forEach(function (gen) {\n", " var script = document.createElement(\"script\");\n", " gen(script)\n", " script.addEventListener(\"load\", function() {\n", " window[\"call_letsPlotJs\"] = function(f) {f();};\n", " window.kotlinQueues[\"letsPlotJs\"].forEach(function(f) {f();});\n", " window.kotlinQueues[\"letsPlotJs\"] = [];\n", " }, false);\n", " script.addEventListener(\"error\", function() {\n", " window[\"call_letsPlotJs\"] = function(f) {};\n", " window.kotlinQueues[\"letsPlotJs\"] = [];\n", " var div = document.createElement(\"div\");\n", " div.style.color = 'darkred';\n", " div.textContent = 'Error loading resource letsPlotJs';\n", " document.getElementById(\"kotlin_out_0\").appendChild(div);\n", " }, false);\n", " \n", " e.appendChild(script);\n", " });\n", " })();\n", " </script>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%useLatestDescriptors\n", "%use lets-plot" ] }, { "cell_type": "code", "execution_count": 2, "id": "419a2215-ebfa-42dd-a692-7a1bdd85b8ad", "metadata": { "execution": { "iopub.execute_input": "2025-12-03T15:55:34.133370Z", "iopub.status.busy": "2025-12-03T15:55:34.132897Z", "iopub.status.idle": "2025-12-03T15:55:34.168286Z", "shell.execute_reply": "2025-12-03T15:55:34.167417Z" } }, "outputs": [ { "data": { "text/plain": [ "Lets-Plot Kotlin API v.4.12.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.8.1.\n", "Outputs: Web (HTML+JS), Kotlin Notebook (Swing), Static SVG (hidden)" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "LetsPlot.getInfo()" ] }, { "cell_type": "code", "execution_count": 3, "id": "going-administration", "metadata": { "execution": { "iopub.execute_input": "2025-12-03T15:55:34.171448Z", "iopub.status.busy": "2025-12-03T15:55:34.170683Z", "iopub.status.idle": "2025-12-03T15:55:34.501371Z", "shell.execute_reply": "2025-12-03T15:55:34.501166Z" } }, "outputs": [ { "data": { "text/html": [ " <div id=\"eaZNPp\"></div>\n", " <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n", " if(!window.letsPlotCallQueue) {\n", " window.letsPlotCallQueue = [];\n", " }; \n", " window.letsPlotCall = function(f) {\n", " window.letsPlotCallQueue.push(f);\n", " };\n", " (function() {\n", " var script = document.createElement(\"script\");\n", " script.type = \"text/javascript\";\n", " script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.8.1/js-package/distr/lets-plot.min.js\";\n", " script.onload = function() {\n", " window.letsPlotCall = function(f) {f();};\n", " window.letsPlotCallQueue.forEach(function(f) {f();});\n", " window.letsPlotCallQueue = [];\n", " \n", " \n", " };\n", " script.onerror = function(event) {\n", " window.letsPlotCall = function(f) {};\n", " window.letsPlotCallQueue = [];\n", " var div = document.createElement(\"div\");\n", " div.style.color = 'darkred';\n", " div.textContent = 'Error loading Lets-Plot JS';\n", " document.getElementById(\"eaZNPp\").appendChild(div);\n", " };\n", " var e = document.getElementById(\"eaZNPp\");\n", " e.appendChild(script);\n", " })();\n", " </script>" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/plot+json": { "apply_color_scheme": true, "output": { "caption": { "text": "The plot caption" }, "data": { "x": [ 0.0, 1.0, 2.0, 3.0, 4.0 ], "y": [ 0.0, 1.0, 2.0, 3.0, 4.0 ] }, "data_meta": { "series_annotations": [ { "column": "x", "type": "int" }, { "column": "y", "type": "int" } ] }, "ggtitle": { "subtitle": "The plot subtitle", "text": "The plot title" }, "guides": { "color": { "title": "Color legend title" }, "size": { "title": "Size legend title" }, "x": { "title": "X axis title" }, "y": { "title": "Y axis title" } }, "kind": "plot", "layers": [ { "geom": "point", "mapping": { "color": "y", "size": "y", "x": "x", "y": "y" }, "position": "identity", "stat": "identity", "tooltips": { "lines": [ "label|value" ], "title": "TITLE" } } ], "mapping": {}, "scales": [] }, "output_type": "lets_plot_spec", "swing_enabled": true }, "text/html": [ " <div id=\"d7EMMr\" ></div>\n", " <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n", " \n", " (function() {\n", " // ----------\n", " \n", " const forceImmediateRender = false;\n", " const responsive = false;\n", " \n", " let sizing = {\n", " width_mode: \"MIN\",\n", " height_mode: \"SCALED\",\n", " width: null, \n", " height: null \n", " };\n", " \n", " const preferredWidth = document.body.dataset.letsPlotPreferredWidth;\n", " if (preferredWidth !== undefined) {\n", " sizing = {\n", " width_mode: 'FIXED',\n", " height_mode: 'SCALED',\n", " width: parseFloat(preferredWidth)\n", " };\n", " }\n", " \n", " const containerDiv = document.getElementById(\"d7EMMr\");\n", " let fig = null;\n", " \n", " function renderPlot() {\n", " if (fig === null) {\n", " const plotSpec = {\n", "\"ggtitle\":{\n", "\"text\":\"The plot title\",\n", "\"subtitle\":\"The plot subtitle\"\n", "},\n", "\"mapping\":{\n", "},\n", "\"guides\":{\n", "\"x\":{\n", "\"title\":\"X axis title\"\n", "},\n", "\"y\":{\n", "\"title\":\"Y axis title\"\n", "},\n", "\"color\":{\n", "\"title\":\"Color legend title\"\n", "},\n", "\"size\":{\n", "\"title\":\"Size legend title\"\n", "}\n", "},\n", "\"data\":{\n", "\"x\":[0.0,1.0,2.0,3.0,4.0],\n", "\"y\":[0.0,1.0,2.0,3.0,4.0]\n", "},\n", "\"kind\":\"plot\",\n", "\"scales\":[],\n", "\"layers\":[{\n", "\"mapping\":{\n", "\"x\":\"x\",\n", "\"y\":\"y\",\n", "\"color\":\"y\",\n", "\"size\":\"y\"\n", "},\n", "\"stat\":\"identity\",\n", "\"position\":\"identity\",\n", "\"geom\":\"point\",\n", "\"tooltips\":{\n", "\"title\":\"TITLE\",\n", "\"lines\":[\"label|value\"]\n", "},\n", "\"data\":{\n", "}\n", "}],\n", "\"caption\":{\n", "\"text\":\"The plot caption\"\n", "},\n", "\"data_meta\":{\n", "\"series_annotations\":[{\n", "\"type\":\"int\",\n", "\"column\":\"x\"\n", "},{\n", "\"type\":\"int\",\n", "\"column\":\"y\"\n", "}]\n", "},\n", "\"spec_id\":\"1\"\n", "};\n", " window.letsPlotCall(function() { fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, containerDiv, sizing); });\n", " } else {\n", " fig.updateView({});\n", " }\n", " }\n", " \n", " const renderImmediately = \n", " forceImmediateRender || (\n", " sizing.width_mode === 'FIXED' && \n", " (sizing.height_mode === 'FIXED' || sizing.height_mode === 'SCALED')\n", " );\n", " \n", " if (renderImmediately) {\n", " renderPlot();\n", " }\n", " \n", " if (!renderImmediately || responsive) {\n", " // Set up observer for initial sizing or continuous monitoring\n", " var observer = new ResizeObserver(function(entries) {\n", " for (let entry of entries) {\n", " if (entry.contentBoxSize && \n", " entry.contentBoxSize[0].inlineSize > 0) {\n", " if (!responsive && observer) {\n", " observer.disconnect();\n", " observer = null;\n", " }\n", " renderPlot();\n", " if (!responsive) {\n", " break;\n", " }\n", " }\n", " }\n", " });\n", " \n", " observer.observe(containerDiv);\n", " }\n", " \n", " // ----------\n", " })();\n", " \n", " </script> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" display=\"block\" class=\"plt-container\" id=256c3090-1b80-43dc-91b5-919cfccb8272 width=\"100%\" height=\"100%\" style=\"max-width: 600.0px; max-height: 400.0px;\" viewBox=\"0 0 600.0 400.0\" preserveAspectRatio=\"xMinYMin meet\">\n", " <style type=\"text/css\">\n", " .plt-container {\n", " font-family: sans-serif;\n", " user-select: none;\n", " -webkit-user-select: none;\n", " -moz-user-select: none;\n", " -ms-user-select: none;\n", "}\n", "text {\n", " text-rendering: optimizeLegibility;\n", "}\n", "#pzIzhmN .plot-title {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 16.0px;\n", "\n", "}\n", "#pzIzhmN .plot-subtitle {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pzIzhmN .plot-caption {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pzIzhmN .hyperlink-element {\n", "fill: #118ed8;\n", "font-weight: normal;\n", "font-style: normal;\n", "\n", "}\n", "#pzIzhmN .legend-title {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pzIzhmN .legend-item {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pzIzhmN .axis-title-x {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pzIzhmN .axis-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#d8xbrEx .axis-tooltip-text-x {\n", "fill: #ffffff;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pzIzhmN .axis-title-y {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pzIzhmN .axis-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#d8xbrEx .axis-tooltip-text-y {\n", "fill: #ffffff;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pzIzhmN .facet-strip-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pzIzhmN .facet-strip-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#d8xbrEx .tooltip-text {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#d8xbrEx .tooltip-title {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#d8xbrEx .tooltip-label {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "\n", " </style>\n", " <g id=\"pzIzhmN\">\n", " <path fill-rule=\"evenodd\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n", " </path>\n", " <g transform=\"translate(21.0 41.0 ) \">\n", " <g>\n", " <g transform=\"translate(23.034701220281416 0.0 ) \">\n", " <g>\n", " <line x1=\"18.284061573681868\" y1=\"0.0\" x2=\"18.284061573681868\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"109.7043694420912\" y1=\"0.0\" x2=\"109.7043694420912\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"201.12467731050054\" y1=\"0.0\" x2=\"201.12467731050054\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"292.5449851789099\" y1=\"0.0\" x2=\"292.5449851789099\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"383.9652930473192\" y1=\"0.0\" x2=\"383.9652930473192\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " <g transform=\"translate(23.034701220281416 0.0 ) \">\n", " <g>\n", " <line x1=\"0.0\" y1=\"292.09090909090907\" x2=\"402.24935462100115\" y2=\"292.09090909090907\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"257.3181818181818\" x2=\"402.24935462100115\" y2=\"257.3181818181818\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"222.5454545454545\" x2=\"402.24935462100115\" y2=\"222.5454545454545\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"187.77272727272725\" x2=\"402.24935462100115\" y2=\"187.77272727272725\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"152.99999999999997\" x2=\"402.24935462100115\" y2=\"152.99999999999997\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"118.22727272727269\" x2=\"402.24935462100115\" y2=\"118.22727272727269\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"83.45454545454544\" x2=\"402.24935462100115\" y2=\"83.45454545454544\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"48.68181818181816\" x2=\"402.24935462100115\" y2=\"48.68181818181816\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"13.909090909090878\" x2=\"402.24935462100115\" y2=\"13.909090909090878\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <g clip-path=\"url(#cWQ2lYS)\" clip-bounds-jfx=\"[rect (23.034701220281416, 0.0), (402.24935462100115, 306.0)]\">\n", " <g transform=\"translate(23.034701220281416 0.0 ) \">\n", " <g>\n", " <g>\n", " <g>\n", " <g >\n", " <circle fill=\"#132b43\" stroke=\"#132b43\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"18.284061573681868\" cy=\"292.09090909090907\" r=\"1.5\" />\n", " <circle fill=\"#22496c\" stroke=\"#22496c\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"109.7043694420912\" cy=\"222.5454545454545\" r=\"3.7500000000000004\" />\n", " <circle fill=\"#336a98\" stroke=\"#336a98\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"201.12467731050054\" cy=\"152.99999999999997\" r=\"6.0\" />\n", " <circle fill=\"#448dc6\" stroke=\"#448dc6\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"292.5449851789099\" cy=\"83.45454545454544\" r=\"8.25\" />\n", " <circle fill=\"#56b1f7\" stroke=\"#56b1f7\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"383.9652930473192\" cy=\"13.909090909090878\" r=\"10.5\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <defs>\n", " <clipPath id=\"cWQ2lYS\">\n", " <rect x=\"23.034701220281416\" y=\"0.0\" width=\"402.24935462100115\" height=\"306.0\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " </g>\n", " <g>\n", " <g transform=\"translate(23.034701220281416 306.0 ) \">\n", " <g transform=\"translate(18.284061573681868 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(109.7043694420912 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(201.12467731050054 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(292.5449851789099 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(383.9652930473192 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <line x1=\"0.0\" y1=\"0.0\" x2=\"402.24935462100115\" y2=\"0.0\" stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\">\n", " </line>\n", " </g>\n", " <g transform=\"translate(23.034701220281416 0.0 ) \">\n", " <g transform=\"translate(0.0 292.09090909090907 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 257.3181818181818 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>0.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 222.5454545454545 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 187.77272727272725 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>1.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 152.99999999999997 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 118.22727272727269 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>2.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 83.45454545454544 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 48.68181818181816 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>3.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 13.909090909090878 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(44.03470122028142 15.8 ) \">\n", " <text style=\"font-size:16.0px;\" y=\"0.0\" class=\"plot-title\">\n", " <tspan>The plot title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(44.03470122028142 35.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"plot-subtitle\">\n", " <tspan>The plot subtitle</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(15.0 194.0 ) rotate(-90.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"axis-title-y\" text-anchor=\"middle\">\n", " <tspan>Y axis title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(245.159378530782 381.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"axis-title-x\" text-anchor=\"middle\">\n", " <tspan>X axis title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(449.28405584128257 41.0 ) \">\n", " <rect x=\"0.0\" y=\"0.0\" height=\"147.5\" width=\"147.71594415871743\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <g transform=\"translate(5.0 5.0 ) \">\n", " <g transform=\"translate(0.0 12.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"legend-title\">\n", " <tspan>Color legend title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(0.0 22.5 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"115.0\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(84,173,242)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"7.55\" height=\"107.45\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(81,166,232)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"13.1\" height=\"101.9\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(77,159,222)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"18.65\" height=\"96.35\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(73,151,213)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"24.2\" height=\"90.8\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(70,144,203)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"29.75\" height=\"85.25\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(66,137,194)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"35.3\" height=\"79.7\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(63,130,184)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"40.849999999999994\" height=\"74.15\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(59,123,175)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"46.39999999999999\" height=\"68.60000000000001\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(56,116,166)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"51.94999999999999\" height=\"63.05000000000001\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(52,110,156)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"57.499999999999986\" height=\"57.500000000000014\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(49,103,147)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"63.04999999999998\" height=\"51.95000000000002\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(46,96,138)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"68.59999999999998\" height=\"46.40000000000002\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(42,90,130)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"74.14999999999998\" height=\"40.85000000000002\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(39,83,121)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"79.69999999999997\" height=\"35.300000000000026\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(36,77,112)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"85.24999999999997\" height=\"29.75000000000003\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(33,70,104)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"90.79999999999997\" height=\"24.20000000000003\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(30,64,95)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"96.34999999999997\" height=\"18.650000000000034\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(27,58,87)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"101.89999999999996\" height=\"13.100000000000037\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(24,52,79)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"107.44999999999996\" height=\"7.55000000000004\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(20,46,71)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <line x1=\"0.0\" y1=\"113.0\" x2=\"4.0\" y2=\"113.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"113.0\" x2=\"23.0\" y2=\"113.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(26.9903027277341 117.55 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"85.25\" x2=\"4.0\" y2=\"85.25\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"85.25\" x2=\"23.0\" y2=\"85.25\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(26.9903027277341 89.8 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"57.5\" x2=\"4.0\" y2=\"57.5\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"57.5\" x2=\"23.0\" y2=\"57.5\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(26.9903027277341 62.05 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"29.75\" x2=\"4.0\" y2=\"29.75\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"29.75\" x2=\"23.0\" y2=\"29.75\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(26.9903027277341 34.3 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"2.0\" x2=\"4.0\" y2=\"2.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"2.0\" x2=\"23.0\" y2=\"2.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(26.9903027277341 6.549999999999999 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(449.28405584128257 198.5 ) \">\n", " <rect x=\"0.0\" y=\"0.0\" height=\"148.5\" width=\"141.86191687870397\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <g transform=\"translate(5.0 5.0 ) \">\n", " <g transform=\"translate(0.0 12.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"legend-title\">\n", " <tspan>Size legend title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(0.0 22.5 ) \">\n", " <g transform=\"\">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"1.5\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(27.9903027277341 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 23.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"3.7500000000000004\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(27.9903027277341 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 46.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"6.0\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(27.9903027277341 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 69.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"8.25\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(27.9903027277341 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 92.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"11.0\" r=\"10.5\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(27.9903027277341 12.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(446.28405584128257 394.4 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"plot-caption\" text-anchor=\"end\">\n", " <tspan>The plot caption</tspan>\n", " </text>\n", " </g>\n", " <path fill=\"rgb(0,0,0)\" fill-opacity=\"0.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\" pointer-events=\"none\">\n", " </path>\n", " </g>\n", " <g id=\"d8xbrEx\">\n", " </g>\n", "</svg>\n", " <script>document.getElementById(\"256c3090-1b80-43dc-91b5-919cfccb8272\").style.display = \"none\";</script>" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "// default theme\n", "val dat = mapOf(\"x\" to 0..4, \"y\" to 0..4)\n", "val p = letsPlot(dat) +\n", " geomPoint(tooltips = layerTooltips().title(\"TITLE\").line(\"label|value\")) {\n", " x = \"x\"\n", " y = \"y\"\n", " size = \"y\"\n", " color = \"y\"\n", " } +\n", " labs(title = \"The plot title\", \n", " subtitle = \"The plot subtitle\",\n", " caption = \"The plot caption\",\n", " x = \"X axis title\", \n", " y = \"Y axis title\", \n", " color = \"Color legend title\",\n", " size = \"Size legend title\"\n", " )\n", "p" ] }, { "cell_type": "code", "execution_count": 4, "id": "olympic-michael", "metadata": { "execution": { "iopub.execute_input": "2025-12-03T15:55:34.503656Z", "iopub.status.busy": "2025-12-03T15:55:34.503440Z", "iopub.status.idle": "2025-12-03T15:55:34.589830Z", "shell.execute_reply": "2025-12-03T15:55:34.589910Z" } }, "outputs": [ { "data": { "application/plot+json": { "apply_color_scheme": true, "output": { "caption": { "text": "The plot caption" }, "data": { "x": [ 0.0, 1.0, 2.0, 3.0, 4.0 ], "y": [ 0.0, 1.0, 2.0, 3.0, 4.0 ] }, "data_meta": { "series_annotations": [ { "column": "x", "type": "int" }, { "column": "y", "type": "int" } ] }, "ggtitle": { "subtitle": "The plot subtitle", "text": "The plot title" }, "guides": { "color": { "title": "Color legend title" }, "size": { "title": "Size legend title" }, "x": { "title": "X axis title" }, "y": { "title": "Y axis title" } }, "kind": "plot", "layers": [ { "geom": "point", "mapping": { "color": "y", "size": "y", "x": "x", "y": "y" }, "position": "identity", "stat": "identity", "tooltips": { "lines": [ "label|value" ], "title": "TITLE" } } ], "mapping": {}, "scales": [], "theme": { "axis_text": { "blank": false, "face": "bold_italic" }, "axis_title": { "blank": false, "face": "bold" }, "legend_text": { "blank": false, "face": "italic" }, "legend_title": { "blank": false, "face": "bold" }, "plot_caption": { "blank": false, "face": "italic" }, "plot_subtitle": { "blank": false, "face": "bold_italic" }, "plot_title": { "blank": false, "face": "italic" }, "tooltip_text": { "blank": false, "face": "italic" } } }, "output_type": "lets_plot_spec", "swing_enabled": true }, "text/html": [ " <div id=\"FFewoi\" ></div>\n", " <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n", " \n", " (function() {\n", " // ----------\n", " \n", " const forceImmediateRender = false;\n", " const responsive = false;\n", " \n", " let sizing = {\n", " width_mode: \"MIN\",\n", " height_mode: \"SCALED\",\n", " width: null, \n", " height: null \n", " };\n", " \n", " const preferredWidth = document.body.dataset.letsPlotPreferredWidth;\n", " if (preferredWidth !== undefined) {\n", " sizing = {\n", " width_mode: 'FIXED',\n", " height_mode: 'SCALED',\n", " width: parseFloat(preferredWidth)\n", " };\n", " }\n", " \n", " const containerDiv = document.getElementById(\"FFewoi\");\n", " let fig = null;\n", " \n", " function renderPlot() {\n", " if (fig === null) {\n", " const plotSpec = {\n", "\"ggtitle\":{\n", "\"text\":\"The plot title\",\n", "\"subtitle\":\"The plot subtitle\"\n", "},\n", "\"mapping\":{\n", "},\n", "\"guides\":{\n", "\"x\":{\n", "\"title\":\"X axis title\"\n", "},\n", "\"y\":{\n", "\"title\":\"Y axis title\"\n", "},\n", "\"color\":{\n", "\"title\":\"Color legend title\"\n", "},\n", "\"size\":{\n", "\"title\":\"Size legend title\"\n", "}\n", "},\n", "\"data\":{\n", "\"x\":[0.0,1.0,2.0,3.0,4.0],\n", "\"y\":[0.0,1.0,2.0,3.0,4.0]\n", "},\n", "\"kind\":\"plot\",\n", "\"scales\":[],\n", "\"layers\":[{\n", "\"mapping\":{\n", "\"x\":\"x\",\n", "\"y\":\"y\",\n", "\"color\":\"y\",\n", "\"size\":\"y\"\n", "},\n", "\"stat\":\"identity\",\n", "\"position\":\"identity\",\n", "\"geom\":\"point\",\n", "\"tooltips\":{\n", "\"title\":\"TITLE\",\n", "\"lines\":[\"label|value\"]\n", "},\n", "\"data\":{\n", "}\n", "}],\n", "\"caption\":{\n", "\"text\":\"The plot caption\"\n", "},\n", "\"theme\":{\n", "\"plot_caption\":{\n", "\"face\":\"italic\",\n", "\"blank\":false\n", "},\n", "\"legend_text\":{\n", "\"face\":\"italic\",\n", "\"blank\":false\n", "},\n", "\"axis_title\":{\n", "\"face\":\"bold\",\n", "\"blank\":false\n", "},\n", "\"axis_text\":{\n", "\"face\":\"bold_italic\",\n", "\"blank\":false\n", "},\n", "\"plot_title\":{\n", "\"face\":\"italic\",\n", "\"blank\":false\n", "},\n", "\"tooltip_text\":{\n", "\"face\":\"italic\",\n", "\"blank\":false\n", "},\n", "\"legend_title\":{\n", "\"face\":\"bold\",\n", "\"blank\":false\n", "},\n", "\"plot_subtitle\":{\n", "\"face\":\"bold_italic\",\n", "\"blank\":false\n", "}\n", "},\n", "\"data_meta\":{\n", "\"series_annotations\":[{\n", "\"type\":\"int\",\n", "\"column\":\"x\"\n", "},{\n", "\"type\":\"int\",\n", "\"column\":\"y\"\n", "}]\n", "},\n", "\"spec_id\":\"3\"\n", "};\n", " window.letsPlotCall(function() { fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, containerDiv, sizing); });\n", " } else {\n", " fig.updateView({});\n", " }\n", " }\n", " \n", " const renderImmediately = \n", " forceImmediateRender || (\n", " sizing.width_mode === 'FIXED' && \n", " (sizing.height_mode === 'FIXED' || sizing.height_mode === 'SCALED')\n", " );\n", " \n", " if (renderImmediately) {\n", " renderPlot();\n", " }\n", " \n", " if (!renderImmediately || responsive) {\n", " // Set up observer for initial sizing or continuous monitoring\n", " var observer = new ResizeObserver(function(entries) {\n", " for (let entry of entries) {\n", " if (entry.contentBoxSize && \n", " entry.contentBoxSize[0].inlineSize > 0) {\n", " if (!responsive && observer) {\n", " observer.disconnect();\n", " observer = null;\n", " }\n", " renderPlot();\n", " if (!responsive) {\n", " break;\n", " }\n", " }\n", " }\n", " });\n", " \n", " observer.observe(containerDiv);\n", " }\n", " \n", " // ----------\n", " })();\n", " \n", " </script> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" display=\"block\" class=\"plt-container\" id=8f063d12-bfe2-48d5-9f7c-9b64aa173f14 width=\"100%\" height=\"100%\" style=\"max-width: 600.0px; max-height: 400.0px;\" viewBox=\"0 0 600.0 400.0\" preserveAspectRatio=\"xMinYMin meet\">\n", " <style type=\"text/css\">\n", " .plt-container {\n", " font-family: sans-serif;\n", " user-select: none;\n", " -webkit-user-select: none;\n", " -moz-user-select: none;\n", " -ms-user-select: none;\n", "}\n", "text {\n", " text-rendering: optimizeLegibility;\n", "}\n", "#pevpCx0 .plot-title {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 16.0px;\n", "\n", "}\n", "#pevpCx0 .plot-subtitle {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pevpCx0 .plot-caption {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pevpCx0 .hyperlink-element {\n", "fill: #118ed8;\n", "font-weight: normal;\n", "font-style: normal;\n", "\n", "}\n", "#pevpCx0 .legend-title {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pevpCx0 .legend-item {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pevpCx0 .axis-title-x {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pevpCx0 .axis-text-x {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#ddKFWgD .axis-tooltip-text-x {\n", "fill: #ffffff;\n", "font-weight: normal;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pevpCx0 .axis-title-y {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pevpCx0 .axis-text-y {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#ddKFWgD .axis-tooltip-text-y {\n", "fill: #ffffff;\n", "font-weight: normal;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pevpCx0 .facet-strip-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pevpCx0 .facet-strip-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: normal;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#ddKFWgD .tooltip-text {\n", "fill: #474747;\n", "font-weight: normal;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#ddKFWgD .tooltip-title {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#ddKFWgD .tooltip-label {\n", "fill: #474747;\n", "font-weight: bold;\n", "font-style: italic;\n", "font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "\n", " </style>\n", " <g id=\"pevpCx0\">\n", " <path fill-rule=\"evenodd\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n", " </path>\n", " <g transform=\"translate(21.0 41.0 ) \">\n", " <g>\n", " <g transform=\"translate(25.173150712697073 0.0 ) \">\n", " <g>\n", " <line x1=\"17.68001679924778\" y1=\"0.0\" x2=\"17.68001679924778\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"106.08010079548669\" y1=\"0.0\" x2=\"106.08010079548669\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"194.4801847917256\" y1=\"0.0\" x2=\"194.4801847917256\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"282.8802687879645\" y1=\"0.0\" x2=\"282.8802687879645\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"371.2803527842034\" y1=\"0.0\" x2=\"371.2803527842034\" y2=\"306.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " <g transform=\"translate(25.173150712697073 0.0 ) \">\n", " <g>\n", " <line x1=\"0.0\" y1=\"292.09090909090907\" x2=\"388.9603695834512\" y2=\"292.09090909090907\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"257.3181818181818\" x2=\"388.9603695834512\" y2=\"257.3181818181818\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"222.5454545454545\" x2=\"388.9603695834512\" y2=\"222.5454545454545\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"187.77272727272725\" x2=\"388.9603695834512\" y2=\"187.77272727272725\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"152.99999999999997\" x2=\"388.9603695834512\" y2=\"152.99999999999997\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"118.22727272727269\" x2=\"388.9603695834512\" y2=\"118.22727272727269\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"83.45454545454544\" x2=\"388.9603695834512\" y2=\"83.45454545454544\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"48.68181818181816\" x2=\"388.9603695834512\" y2=\"48.68181818181816\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"13.909090909090878\" x2=\"388.9603695834512\" y2=\"13.909090909090878\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <g clip-path=\"url(#c2nU1Ny)\" clip-bounds-jfx=\"[rect (25.173150712697073, 0.0), (388.9603695834512, 306.0)]\">\n", " <g transform=\"translate(25.173150712697073 0.0 ) \">\n", " <g>\n", " <g>\n", " <g>\n", " <g >\n", " <circle fill=\"#132b43\" stroke=\"#132b43\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"17.68001679924778\" cy=\"292.09090909090907\" r=\"1.5\" />\n", " <circle fill=\"#22496c\" stroke=\"#22496c\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"106.08010079548669\" cy=\"222.5454545454545\" r=\"3.7500000000000004\" />\n", " <circle fill=\"#336a98\" stroke=\"#336a98\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"194.4801847917256\" cy=\"152.99999999999997\" r=\"6.0\" />\n", " <circle fill=\"#448dc6\" stroke=\"#448dc6\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"282.8802687879645\" cy=\"83.45454545454544\" r=\"8.25\" />\n", " <circle fill=\"#56b1f7\" stroke=\"#56b1f7\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"371.2803527842034\" cy=\"13.909090909090878\" r=\"10.5\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <defs>\n", " <clipPath id=\"c2nU1Ny\">\n", " <rect x=\"25.173150712697073\" y=\"0.0\" width=\"388.9603695834512\" height=\"306.0\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " </g>\n", " <g>\n", " <g transform=\"translate(25.173150712697073 306.0 ) \">\n", " <g transform=\"translate(17.68001679924778 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(106.08010079548669 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(194.4801847917256 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(282.8802687879645 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(371.2803527842034 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <line x1=\"0.0\" y1=\"0.0\" x2=\"388.9603695834512\" y2=\"0.0\" stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\">\n", " </line>\n", " </g>\n", " <g transform=\"translate(25.173150712697073 0.0 ) \">\n", " <g transform=\"translate(0.0 292.09090909090907 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 257.3181818181818 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>0.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 222.5454545454545 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 187.77272727272725 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>1.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 152.99999999999997 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 118.22727272727269 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>2.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 83.45454545454544 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 48.68181818181816 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>3.5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 13.909090909090878 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(46.17315071269707 15.8 ) \">\n", " <text style=\"font-size:16.0px;\" y=\"0.0\" class=\"plot-title\">\n", " <tspan>The plot title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(46.17315071269707 35.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"plot-subtitle\">\n", " <tspan>The plot subtitle</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(15.0 194.0 ) rotate(-90.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"axis-title-y\" text-anchor=\"middle\">\n", " <tspan>Y axis title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(240.65333550442267 381.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"axis-title-x\" text-anchor=\"middle\">\n", " <tspan>X axis title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(438.1335202961483 41.0 ) \">\n", " <rect x=\"0.0\" y=\"0.0\" height=\"147.5\" width=\"158.8664797038517\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <g transform=\"translate(5.0 5.0 ) \">\n", " <g transform=\"translate(0.0 12.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"legend-title\">\n", " <tspan>Color legend title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(0.0 22.5 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"115.0\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(84,173,242)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"7.55\" height=\"107.45\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(81,166,232)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"13.1\" height=\"101.9\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(77,159,222)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"18.65\" height=\"96.35\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(73,151,213)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"24.2\" height=\"90.8\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(70,144,203)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"29.75\" height=\"85.25\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(66,137,194)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"35.3\" height=\"79.7\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(63,130,184)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"40.849999999999994\" height=\"74.15\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(59,123,175)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"46.39999999999999\" height=\"68.60000000000001\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(56,116,166)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"51.94999999999999\" height=\"63.05000000000001\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(52,110,156)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"57.499999999999986\" height=\"57.500000000000014\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(49,103,147)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"63.04999999999998\" height=\"51.95000000000002\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(46,96,138)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"68.59999999999998\" height=\"46.40000000000002\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(42,90,130)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"74.14999999999998\" height=\"40.85000000000002\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(39,83,121)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"79.69999999999997\" height=\"35.300000000000026\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(36,77,112)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"85.24999999999997\" height=\"29.75000000000003\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(33,70,104)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"90.79999999999997\" height=\"24.20000000000003\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(30,64,95)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"96.34999999999997\" height=\"18.650000000000034\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(27,58,87)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"101.89999999999996\" height=\"13.100000000000037\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(24,52,79)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <rect x=\"0.0\" y=\"107.44999999999996\" height=\"7.55000000000004\" width=\"23.0\" stroke-width=\"0.0\" fill=\"rgb(20,46,71)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <line x1=\"0.0\" y1=\"113.0\" x2=\"4.0\" y2=\"113.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"113.0\" x2=\"23.0\" y2=\"113.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(27.059593476713992 117.55 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"85.25\" x2=\"4.0\" y2=\"85.25\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"85.25\" x2=\"23.0\" y2=\"85.25\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(27.059593476713992 89.8 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"57.5\" x2=\"4.0\" y2=\"57.5\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"57.5\" x2=\"23.0\" y2=\"57.5\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(27.059593476713992 62.05 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"29.75\" x2=\"4.0\" y2=\"29.75\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"29.75\" x2=\"23.0\" y2=\"29.75\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(27.059593476713992 34.3 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " <line x1=\"0.0\" y1=\"2.0\" x2=\"4.0\" y2=\"2.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <line x1=\"19.0\" y1=\"2.0\" x2=\"23.0\" y2=\"2.0\" stroke-width=\"1.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\">\n", " </line>\n", " <g transform=\"translate(27.059593476713992 6.549999999999999 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(438.1335202961483 198.5 ) \">\n", " <rect x=\"0.0\" y=\"0.0\" height=\"148.5\" width=\"152.3929782268863\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <g transform=\"translate(5.0 5.0 ) \">\n", " <g transform=\"translate(0.0 12.0 ) \">\n", " <text style=\"font-size:15.0px;\" y=\"0.0\" class=\"legend-title\">\n", " <tspan>Size legend title</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(0.0 22.5 ) \">\n", " <g transform=\"\">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"1.5\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(28.059593476713992 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 23.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"3.7500000000000004\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(28.059593476713992 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 46.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"6.0\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(28.059593476713992 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 69.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"10.5\" r=\"8.25\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(28.059593476713992 11.5 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 92.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <g >\n", " <circle fill=\"#474747\" stroke=\"#474747\" stroke-opacity=\"0.0\" stroke-width=\"0.0\" cx=\"11.0\" cy=\"11.0\" r=\"10.5\" />\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(28.059593476713992 12.0 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"legend-item\" dy=\"0.35em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(435.1335202961483 394.4 ) \">\n", " <text style=\"font-size:13.0px;\" y=\"0.0\" class=\"plot-caption\" text-anchor=\"end\">\n", " <tspan>The plot caption</tspan>\n", " </text>\n", " </g>\n", " <path fill=\"rgb(0,0,0)\" fill-opacity=\"0.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\" pointer-events=\"none\">\n", " </path>\n", " </g>\n", " <g id=\"ddKFWgD\">\n", " </g>\n", "</svg>\n", " <script>document.getElementById(\"8f063d12-bfe2-48d5-9f7c-9b64aa173f14\").style.display = \"none\";</script>" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "// Change the font face property of some elements.\n", "\n", "p + theme(\n", " plotTitle = elementText(face = \"italic\"), \n", " plotSubtitle = elementText(face = \"bold_italic\"),\n", " plotCaption = elementText(face = \"italic\"),\n", " \n", " legendTitle = elementText(face = \"bold\"),\n", " legendText = elementText(face = \"italic\"),\n", " \n", " axisTitle = elementText(face = \"bold\"),\n", " axisText = elementText(face = \"bold_italic\"),\n", "\n", " // The 'tooltipText' value will also applied to axes tooltips ('italic');\n", " // title and label in general tooltip are bold by default -> the result for them is 'bold_italic' \n", " tooltipText = elementText(face = \"italic\"))\n" ] } ], "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": "2.2.20-Beta2" } }, "nbformat": 4, "nbformat_minor": 5 }