{ "cells": [ { "cell_type": "markdown", "id": "cf9a1628", "metadata": {}, "source": [ "# Sharing X,Y-axis Scale Limits\n", "Use `sharex`, `sharey` parameters in the `gggrid()` function \n", "to control sharing of axis scale limits among plots in grid:\n", "\n", "- \"all\" or `True` - share limits between all subplots\n", "- \"none\" or `False` - do not share limits between subplots\n", "- \"row\" - share limits between subplots in the same row\n", "- \"col\" - share limits between subplots in the same column\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "a46ceb17", "metadata": {}, "outputs": [], "source": [ "from lets_plot import *\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 2, "id": "40380e4b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "d45ce9e7", "metadata": {}, "outputs": [], "source": [ "np.random.seed(37)\n", "dat1 = {'x': np.random.normal(size=1000)}\n", "dat2 = {'x': np.random.normal(size=200)}\n", "\n", "p1 = ggplot(dat1, aes(x='x')) + geom_histogram()\n", "p2 = ggplot(dat2, aes(x='x')) + geom_histogram()" ] }, { "cell_type": "markdown", "id": "89d899a4", "metadata": {}, "source": [ "#### 1. Two Independent Charts in Grid" ] }, { "cell_type": "code", "execution_count": 4, "id": "48b26e36", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "