{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# GGBunch\n", "\n", "*GGBunch* allows to show a collection of plots on one figure. Each plot in the collection can have arbitrary location and size. There is no automatic layout inside the bunch." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:34:39.796313Z", "iopub.status.busy": "2024-04-17T07:34:39.796230Z", "iopub.status.idle": "2024-04-17T07:34:40.117275Z", "shell.execute_reply": "2024-04-17T07:34:40.116930Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "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-17T07:34:40.131326Z", "iopub.status.busy": "2024-04-17T07:34:40.131166Z", "iopub.status.idle": "2024-04-17T07:34:40.132700Z", "shell.execute_reply": "2024-04-17T07:34:40.132526Z" } }, "outputs": [], "source": [ "np.random.seed(42)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:34:40.133926Z", "iopub.status.busy": "2024-04-17T07:34:40.133778Z", "iopub.status.idle": "2024-04-17T07:34:40.135685Z", "shell.execute_reply": "2024-04-17T07:34:40.135494Z" } }, "outputs": [], "source": [ "cov=[[1, 0], \n", " [0, 1]] \n", "x, y = np.random.multivariate_normal(mean=[0,0], cov=cov, size=400).T\n", "\n", "data = dict(\n", " x = x,\n", " y = y\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### View this data as a scatter plot and as a histogram" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:34:40.136701Z", "iopub.status.busy": "2024-04-17T07:34:40.136585Z", "iopub.status.idle": "2024-04-17T07:34:40.170261Z", "shell.execute_reply": "2024-04-17T07:34:40.169904Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "