{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "27c415bc-19bd-4ab4-80c9-efdb5d33c03a", "metadata": { "execution": { "iopub.execute_input": "2025-07-17T17:09:22.390249Z", "iopub.status.busy": "2025-07-17T17:09:22.390072Z", "iopub.status.idle": "2025-07-17T17:09:22.393150Z", "shell.execute_reply": "2025-07-17T17:09:22.392965Z" } }, "outputs": [], "source": [ "import numpy as np\n", "\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "771f62b1-b4d8-48e3-b2cb-2fae1c4177a8", "metadata": { "execution": { "iopub.execute_input": "2025-07-17T17:09:22.394087Z", "iopub.status.busy": "2025-07-17T17:09:22.393938Z", "iopub.status.idle": "2025-07-17T17:09:22.395719Z", "shell.execute_reply": "2025-07-17T17:09:22.395533Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "a048d094-8294-47ac-98d4-920c2c441f64", "metadata": { "execution": { "iopub.execute_input": "2025-07-17T17:09:22.396551Z", "iopub.status.busy": "2025-07-17T17:09:22.396479Z", "iopub.status.idle": "2025-07-17T17:09:22.420546Z", "shell.execute_reply": "2025-07-17T17:09:22.420248Z" } }, "outputs": [], "source": [ "np.random.seed(0) \n", "N = 200\n", "noise = dict(\n", " x = np.random.uniform(0, 200, N),\n", " y = np.random.uniform(100, 400, N),\n", " size = np.random.uniform(0.1, 2, N) \n", ")\n", "backdrop = geom_point(aes(\"x\", \"y\", size=\"size\"), data=noise, tooltips='none') " ] }, { "cell_type": "code", "execution_count": 4, "id": "87412abd-01b8-4295-969d-cf967fbbc5fb", "metadata": { "execution": { "iopub.execute_input": "2025-07-17T17:09:22.421675Z", "iopub.status.busy": "2025-07-17T17:09:22.421453Z", "iopub.status.idle": "2025-07-17T17:09:22.424288Z", "shell.execute_reply": "2025-07-17T17:09:22.424109Z" } }, "outputs": [], "source": [ "items = [\n", " dict(\n", " name=\"Lets-Plot\\nMultiplatform\",\n", " documentation_url=\"https://lets-plot.org\",\n", " sources_url=\"https://github.com/JetBrains/lets-plot\",\n", " x=0, y=0, size=14, shape=16, angle=0\n", " ),\n", " dict(\n", " name=\"Lets-Plot\\nfor Python\",\n", " documentation_url=\"https://lets-plot.org/kotlin/get-started.html\",\n", " sources_url=\"https://github.com/JetBrains/lets-plot-kotlin\",\n", " x=130, y=150, size=9, shape=15, angle=15\n", " ),\n", " dict(\n", " name=\"Lets-Plot\\nfor Kotlin\",\n", " documentation_url=\"https://lets-plot.org/kotlin/get-started.html\",\n", " sources_url=\"https://github.com/JetBrains/lets-plot-kotlin\",\n", " x=200, y=200, size=7, shape=15, angle=-15\n", " ),\n", " dict(\n", " name=\"Lets-Plot\\nCompose Multiplatform\",\n", " documentation_url=\"https://github.com/JetBrains/lets-plot-skia\",\n", " sources_url=\"https://github.com/JetBrains/lets-plot-skia\",\n", " x=80, y=250, size=7, shape=15, angle=30\n", " ),\n", " dict(\n", " name=\"Geocoding\",\n", " documentation_url=\"https://lets-plot.org/python/pages/geocoding.html\",\n", " sources_url=\"https://github.com/JetBrains/lets-plot\",\n", " x=70, y=320, size=7, shape=17, angle=0\n", " ),\n", " dict(\n", " name=\"Kandy\",\n", " documentation_url=\"https://kotlin.github.io/kandy/welcome.html\",\n", " sources_url=\"https://github.com/Kotlin/kandy\",\n", " x=195.0, y=150.0, size=4.0, shape=16, angle=0.0\n", " ),\n", "]\n", "\n", "map_to = lambda key: [item[key] for item in items]\n", "data = dict(name=map_to(\"name\"),\n", " documentation_url=map_to(\"documentation_url\"),\n", " sources_url=map_to(\"sources_url\"),\n", " x=map_to(\"x\"),\n", " y=map_to(\"y\"),\n", " size=map_to(\"size\"),\n", " shape=map_to(\"shape\"),\n", " angle=map_to(\"angle\"))" ] }, { "cell_type": "code", "execution_count": 5, "id": "abc5e82f-06f0-4fa0-9dfb-f244e1d8e45b", "metadata": { "execution": { "iopub.execute_input": "2025-07-17T17:09:22.425196Z", "iopub.status.busy": "2025-07-17T17:09:22.425034Z", "iopub.status.idle": "2025-07-17T17:09:22.436633Z", "shell.execute_reply": "2025-07-17T17:09:22.436455Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "