{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2025-11-05T13:47:18.962598Z", "iopub.status.busy": "2025-11-05T13:47:18.962511Z", "iopub.status.idle": "2025-11-05T13:47:18.966074Z", "shell.execute_reply": "2025-11-05T13:47:18.965897Z" }, "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "import random\n", "from lets_plot import *\n", "\n", "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2025-11-05T13:47:18.979651Z", "iopub.status.busy": "2025-11-05T13:47:18.979574Z", "iopub.status.idle": "2025-11-05T13:47:18.981205Z", "shell.execute_reply": "2025-11-05T13:47:18.981027Z" } }, "outputs": [], "source": [ "# This example was found at: www.cookbook-r.com/Graphs/Scatterplots_(ggplot2)\n", "random.seed(123)\n", "data = dict(\n", " cond=np.repeat(['A','B'], 10),\n", " xvar=[i + random.normalvariate(0, 3) for i in range(0,20)],\n", " yvar=[i + random.normalvariate(0, 3) for i in range(0,20)]\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Basic scatter-plot" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2025-11-05T13:47:18.982248Z", "iopub.status.busy": "2025-11-05T13:47:18.982180Z", "iopub.status.idle": "2025-11-05T13:47:19.011937Z", "shell.execute_reply": "2025-11-05T13:47:19.011624Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "