{ "cells": [ { "cell_type": "markdown", "id": "50b64383-b9cb-4e20-bfec-c59d96cb0f63", "metadata": {}, "source": [ "# The `panel_inset` Parameter in `theme()`" ] }, { "cell_type": "code", "execution_count": 1, "id": "a181905e-ddbd-416e-8e10-20210d57f4bd", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from lets_plot import *\n", "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 2, "id": "bd55dece-a599-4a1e-939e-3779c4a0adfc", "metadata": {}, "outputs": [], "source": [ "hours = list(map(lambda v: '{:02d}:00'.format(v), range(12)))\n", "\n", "p = ggplot() \\\n", " + geom_point(aes(x=hours)) \\\n", " + theme_grey() \\\n", " + theme(axis_line=element_line(color='black'))" ] }, { "cell_type": "markdown", "id": "b4f60f05-f388-4fab-8bec-cb347612d009", "metadata": {}, "source": [ "## Polar Coordinate System\n", "\n", "In the polar coordinate system, it's common for tick labels to overlap.\n", "\n", "The `panel_inset` parameter assists in creating additional space to accommodate tick labels more effectively." ] }, { "cell_type": "code", "execution_count": 3, "id": "6f8f448b-6033-4e79-b730-51aa45edbc2f", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "