{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "willing-scope", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:09:15.295463Z", "iopub.status.busy": "2024-04-26T12:09:15.295463Z", "iopub.status.idle": "2024-04-26T12:09:16.274552Z", "shell.execute_reply": "2024-04-26T12:09:16.273549Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "from lets_plot import *\n", "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 2, "id": "ancient-fifth", "metadata": { "execution": { "iopub.execute_input": "2024-04-26T12:09:16.274552Z", "iopub.status.busy": "2024-04-26T12:09:16.274552Z", "iopub.status.idle": "2024-04-26T12:09:16.400737Z", "shell.execute_reply": "2024-04-26T12:09:16.400737Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " " ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "n = 200\n", "np.random.seed(42)\n", "\n", "x = np.repeat(['A','B'], n)\n", "y = np.concatenate((np.random.normal(0, 1, n), np.random.normal(.8, 1, n)))\n", "\n", "ggplot({'x': x, 'y': y}, aes(x='x', y='y', color='x')) + geom_boxplot() + coord_flip()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.13" } }, "nbformat": 4, "nbformat_minor": 5 }