{ "cells": [ { "cell_type": "markdown", "id": "9b091448", "metadata": {}, "source": [ "# The `plot_inset` Parameter in `theme()`\n", "\n", "The `plot_inset` parameter in `theme()` specifies the inset for a plotting area, including the axes with their labels, but without titles.\n", "The parameter is set according to the margin rules: accept a number or a list of numbers." ] }, { "cell_type": "code", "execution_count": 1, "id": "d443f816", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "5936e6bd", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "20006cf6", "metadata": {}, "outputs": [], "source": [ "np.random.seed(42)\n", "\n", "x = np.linspace(-np.pi, np.pi, 100)\n", "y = np.sin(x)\n", "\n", "p = ggplot({'x': x, 'y': y}, aes(x='x', y='y')) + \\\n", " geom_line() + \\\n", " ggtitle(\"Sine wave\") + \\\n", " theme_light() + \\\n", " theme(plot_background=element_rect(size=1))" ] }, { "cell_type": "code", "execution_count": 4, "id": "d07bb38e", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "