{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:33:19.985737Z", "iopub.status.busy": "2024-04-17T07:33:19.985331Z", "iopub.status.idle": "2024-04-17T07:33:20.300691Z", "shell.execute_reply": "2024-04-17T07:33:20.300454Z" }, "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": "2024-04-17T07:33:20.313779Z", "iopub.status.busy": "2024-04-17T07:33:20.313635Z", "iopub.status.idle": "2024-04-17T07:33:20.315674Z", "shell.execute_reply": "2024-04-17T07:33:20.315488Z" } }, "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": "2024-04-17T07:33:20.316776Z", "iopub.status.busy": "2024-04-17T07:33:20.316604Z", "iopub.status.idle": "2024-04-17T07:33:20.348245Z", "shell.execute_reply": "2024-04-17T07:33:20.348044Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "