{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2024-04-26T11:44:07.148300Z", "iopub.status.busy": "2024-04-26T11:44:07.148300Z", "iopub.status.idle": "2024-04-26T11:44:08.125477Z", "shell.execute_reply": "2024-04-26T11:44:08.125477Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from pandas import DataFrame\n", "import numpy as np\n", "from lets_plot import *\n", "\n", "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2024-04-26T11:44:08.158737Z", "iopub.status.busy": "2024-04-26T11:44:08.158737Z", "iopub.status.idle": "2024-04-26T11:44:08.173220Z", "shell.execute_reply": "2024-04-26T11:44:08.173220Z" } }, "outputs": [], "source": [ "# This example was found at: www.cookbook-r.com/Graphs/Plotting_distributions_(ggplot2)\n", "np.random.seed(123)\n", "data = DataFrame(dict(\n", " cond=np.repeat(['A','B'], 200),\n", " rating=np.concatenate((np.random.normal(0, 1, 200), np.random.normal(.8, 1, 200)))\n", "))" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2024-04-26T11:44:08.173220Z", "iopub.status.busy": "2024-04-26T11:44:08.173220Z", "iopub.status.idle": "2024-04-26T11:44:08.300809Z", "shell.execute_reply": "2024-04-26T11:44:08.299776Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "\n", " | cond | \n", "rating | \n", "
---|---|---|
0 | \n", "A | \n", "0.003787 | \n", "
1 | \n", "B | \n", "0.685638 | \n", "