{ "cells": [ { "cell_type": "markdown", "id": "ed4d75f9-7071-4a88-a88d-690f99ef1d1d", "metadata": {}, "source": [ "# Responsive Element Sizing with `size_unit='min'` and `size_unit='max'`\n", "\n", "\n", "These options provide control over element sizing by automatically adapting to plot dimensions and aspect ratios.\n", "\n", "The `'min'` option is particularly useful for ensuring elements fit within plot boundaries regardless of the plot's size or form factor." ] }, { "cell_type": "code", "execution_count": 1, "id": "78964b74-1284-4f63-82dd-c7f1872b6025", "metadata": {}, "outputs": [], "source": [ "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "945229c6-c120-45e1-85b9-06383e55e918", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "e3156726-e9f3-4ff5-92b8-caa8020cc8a7", "metadata": {}, "outputs": [], "source": [ "data = {'name': ['a', 'b', 'c', 'd', 'b'], 'value': [40, 90, 10, 50, 20]}\n" ] }, { "cell_type": "markdown", "id": "d1f11b35-2fef-4659-b904-ac78c11ba3c5", "metadata": {}, "source": [ "#### `size_unit='min'`" ] }, { "cell_type": "code", "execution_count": 4, "id": "5ca804b3-8511-4603-b17b-621e0afbaf3d", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "